WIDGET-CSH-TRANSACTION.lview 12.8 KB
Newer Older
niminmin's avatar
niminmin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
<?xml version="1.0" encoding="UTF-8"?>

<!--
    $Author:
    $Date: 2018/8/2
    $Revision: 1.0
    11.回款查询
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view template="default" package="leaf.ui.std">
        <style>
            html,body{
            background-color:#eee;
            width:1170px;
            height:355px;
            margin: 0;
            padding: 0;
            }
            .widget_csh_transaction{
            width:1170px;
            height:355px;
            position:relative;
            }
            .widget_csh_transaction .hls-pagging-grid{
            width:870px;
            }
            .widget_csh_transaction .hls-pagging-grid .grid-title{
            border-bottom:4px solid #F57B69;
            height:45px;
            }
            .widget_csh_transaction .hls-pagging-grid .grid-title img{
            width:20px;
            height:20px;
            position:relative;
            top:5px;
            }
            .widget_csh_transaction .hls-pagging-grid .grid-title>span{
            font-family:"Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Microsoft Yahei", "Hiragino Sans GB", sans-serif;
            font-size:13px;
            line-height:45px;
            color:#000;
            text-size-adjust:100%;
            font-weight:bold;
            }
            .widget_csh_transaction .clickable{
            cursor:pointer;
            }
            .widget_csh_transaction .left{
            width:270px;
            height:355px;
            background-color:#fff;
            float:left;
            }
            .widget_csh_transaction .right{
            width:870px;
            height:355px;
            background-color:#fff;
            float:left;
            margin-left:30px;
            }
            .widget_csh_transaction .clearFloat{
            clear:both;
            height:0;
            line-height:0;
            font-size:0
            }
            .widget_csh_transaction .queryList .listTitle{
            border-bottom:4px solid #00B3B3;
            font-size: 13px;
            height: 40px;
            line-height: 40px;
            padding: 0 10px;
            font-weight: 600;
            }
            .widget_csh_transaction .queryList .listTitle .right-img{
            width: 20px;
            height: 20px;
            margin:10px 10px 0 0;
            float:right;
            }
            .widget_csh_transaction .queryList .listBody{
            padding:10px;
            }
            .widget_csh_transaction .queryList .listRow{
            padding:5px;
            border-bottom:1px solid rgb(229, 229, 229);
            }
            .widget_csh_transaction .queryList .listRow p{
            color:#000;
            font-size:13px;
            font-weight:100;
            line-height:20px;
            margin:5px 0;
            }
            .widget_csh_transaction .queryList .listRow .inputWrapper{
            border: 1px solid rgb(204, 204, 204);
            width: 230px;
            height: 30px;
            margin-top: 5px;
            border-radius: 5px;
            }
            .widget_csh_transaction .queryList .listRow .inputWrapper img{
            width: 20px;
            height: 20px;
            margin:5px;
            }
            .widget_csh_transaction .queryList .listRow .inputWrapper input{
            background: #fff;
            width: 200px;
            height: 24px;
            position:relative;
            top:-10px;
            border:none;
            }
            .widget_csh_transaction .queryList .listRow .selectSpan{
            display: inline-block;
            width:72px;
            height:30px;
            line-height:30px;
            text-align: center;
            border: 1px solid #CCC;
            border-radius: 4px;
            font-size: 12px;
            margin:10px 2px;
            cursor: pointer;
            background-color:#fff;
            color:#000;
            }
            .widget_csh_transaction .queryList .listRow .selectedSpan{
            background-color:#00b3b3;
            color:#fff;
            }
            .widget_csh_transaction .queryList .listRow .submitBtn{
            text-align:right
            }
            .widget_csh_transaction .queryList .listRow .submitBtn span{
            display:inline-block;
            width:72px;
            height:30px;
            line-height:30px;
            text-align: center;
            background-color:#FA6A4D;
            color:#fff;
            border-radius: 4px;
            font-size: 12px;
            margin:10px 2px;
            cursor: pointer;
            }
        </style>
        <script><![CDATA[
        //查询条件数据结构
        var queryParam={
            "timeZone":"",
            "conInfo":"",
            "conl":0,
            "conlb":0,
            contract_type:""
        };
        jQuery(document).ready(function(){
            jQuery(".listBody").on('click',function(e){
                $this=jQuery(e.target);

                //时间跨度单选点击事件
                if($this.attr("class").indexOf('timeZone')>=0){
                    var allSpans=jQuery(".timeZone");
                    for(var i=0;i<allSpans.length;i++){
                        if(allSpans[i].id!=$this.attr("id")){
                            jQuery(allSpans[i]).removeClass("selectedSpan");
                        }
                    }
                    $this.toggleClass("selectedSpan");
                    if($this.attr("class").indexOf('selectedSpan')>=0){
                        queryParam.timeZone=$this.attr("id");
                    }else{
                        queryParam.timeZone="";
                    }
                }

                //合同类型多选点击事件
                if($this.attr("id")=='conl'){
                    $this.toggleClass("selectedSpan");
                    if($this.attr("class").indexOf('selectedSpan')>=0){
                        queryParam.conl=1;
                    }else{
                        queryParam.conl=0;
                    }
                }
                if($this.attr("id")=='conlb'){
                    $this.toggleClass("selectedSpan");
                    if($this.attr("class").indexOf('selectedSpan')>=0){
                        queryParam.conlb=1;
                    }else{
                        queryParam.conlb=0;
                    }
                }

                //查询按钮点击事件
                if($this.attr("id")=='submitBtn'){
                    $("csh_transaction_ds").qpara=getQueryParam();
                    $("csh_transaction_ds").query();
                }
            });

        });
        //获取查询条件函数
        function getQueryParam(){
            queryParam.conInfo=document.getElementById("conInfoInput").value;
            return queryParam;
        }
        function add_transaction_handler(){
            <!--top.mainJumpCode('CSH511',true);-->
            location.href='/modules/csh/CSH511/csh_transaction_receipt.lview';
        }
        function go_csh_transaction_query(){
            <!--top.mainJumpCode('CSH510',true)-->
            location.href='/modules/csh/CSH510/csh_transaction_receipt_maintain.lview';
        }
        function bp_info_renderer(record,index){
            var html='<p style="width:150px;max-height:16px;">'+record.data['bp_code']+'</p>';
            html+='<p style="color:#9f9f9f;width:150px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">'+record.data['bp_name']+'</p>';
            return html;
        }
        function con_info_renderer(record,index){
            var html='<p style="width:150px;max-height:16px;">'+record.data['contract_number']+'</p>';
            html+='<p style="color:#9f9f9f;width:150px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">'+record.data['contract_name']+'</p>';
            return html;
        }
        function bank_info_renderer(record,index){
            var html='<p style="width:150px;max-height:16px;">'+record.data['bp_bank_account_id']+'</p>';
            html+='<p style="color:#9f9f9f;width:150px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">'+record.data['bp_bank_account_num']+'</p>';
            return html;
        }
        function transaction_info_btn_renderer(record,index){
            var transaction_id=record.data["transaction_id"];
            return "<img onclick='openWindow(\"/modules/csh/CSH510/csh_transaction_receipt_post_query.lview?transaction_id=" + transaction_id+ "\")' style='cursor:pointer;width:15px;height:15px;display:inline-block;margin:0px;' src='${base.contextPath}/leafresource/images/widget/detail.png' alt='png'/>";
        }
        function openWindow(url) {
            new Leaf.Window({
                id: 'csh_transaction_receipt_link_winid',
                params: {
                    winId: 'csh_transaction_receipt_link_winid'
                },
                url: url,
                title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
                fullScreen: true
            });
        }
            ]]></script>
        <a:dataSets>
            <a:dataSet id="csh_transaction_ds" autoQuery="true"  pageSize="5" model="csh.CSH911.csh_transaction">
                <a:fields>
                    <a:field name="transaction_date"/>
                    <a:field name="write_off_date"/>
                    <a:field name="bp_name"/>
                    <a:field name="bp_code"/>
                    <a:field name="contract_number"/>
                    <a:field name="contract_name"/>
                    <a:field name="transaction_amount"/>
                    <a:field name="bp_bank_account_id"/>
                    <a:field name="bp_bank_account_num"/>
                    <a:field name="payment_method"/>
                    <a:field name="transaction_id"/>
                    <a:field name="transaction_num"/>
                    <a:field name="contract_type_n"/>
                    <a:field name="contract_type"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <div class="widget_csh_transaction">
            <div class="left queryList">
                <div class="listTitle">
                    <img class="right-img clickable" onclick="go_csh_transaction_query()" src="${/request/@context_path}/leafresource/images/widget/search_flag.png"/>
                    <span>收款查询</span>
                </div>
                <div class="listBody">
                    <div class="listRow">
                        <p class="">时间跨度</p>
                        <span id="7" class="selectSpan timeZone">1周内</span>
                        <span id="30" class="selectSpan timeZone">1个月内</span>
                        <span id="90" class="selectSpan timeZone">3个月内</span>
                    </div>
                    <div class="listRow">
                        <p class="">合同信息</p>
                        <div class="inputWrapper">
                            <img src="${/request/@context_path}/leafresource/images/widget/search.png"/>
                            <input type="text" id="conInfoInput" placeholder="请输入合同编号、名称或承租人名称" class=""/>
                        </div>
                    </div>
                    <div class="listRow">
                        <p class="">合同类型</p>
                        <span id="conl" class="selectSpan">直租合同</span>
                        <span id="conlb" class="selectSpan">回租合同</span>
                        <div class="submitBtn"><span class="" id="submitBtn">查询</span></div>
                    </div>
                </div>
            </div>
            <div class="right">
                <a:hapGrid title="回笼信息" bindTarget="csh_transaction_ds" titleImg="/leafresource/images/widget/receipt.png" canWheel="true">
                    <a:toolBar>
                        <a:button icon="/leafresource/images/widget/add.png" click="add_transaction_handler"/>
                    </a:toolBar>
                    <a:columns>
                        <a:column name="transaction_date" prompt="收款日期"/>
                        <a:column name="write_off_date" prompt="核销日期"/>
                        <a:column template="bp_info_renderer" prompt="商业伙伴名称/编号"/>
                        <a:column template="con_info_renderer"  prompt="合同信息"/>
                        <a:column name="transaction_amount"  prompt="收款金额"/>
                        <a:column template="bank_info_renderer"  prompt="收款账户/账号"/>
                        <a:column name="payment_method"  prompt="收款方式"/>
                        <a:column template="transaction_info_btn_renderer" prompt="明细"/>
                    </a:columns>
                </a:hapGrid>
            </div>
            <div class="clearFloat"> </div>
        </div>
        <a:screenBody style="display:none"> </a:screenBody>
    </a:view>
</a:screen>