contract_sales_report.lview 15.3 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
2
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true"
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
          trace="true">
    <a:init-procedure/>
    <a:view>

        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="${/parameter/@layout_code}con_contract_query_link"
                url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
        <script type="text/javascript"><![CDATA[

        // window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
        //     var lnds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_RESULT', 'hls_journal_detail');
        //      $(lnds).query();
        //      debugger
        //     var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_AGENT', 'hls_journal_detail');
        //     $(ds_id).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3400.contract_sales_report_query/query');
        //     $(ds_id).query();
        //
        // }

23
       /* window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
24
            console.log(ds.id)
stone's avatar
stone committed
25
            var lnds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_RESULT', 'hls_journal_detail');
26 27
            var lndss = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_RESULT_COPY', 'hls_journal_detail');
            if(lndss==ds.id){
28 29 30
               var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_AGENT', 'hls_journal_detail');
               $(ds_id).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3400.contract_sales_report_query/query');
               $(ds_id).query();
31 32
                $(lnds).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3400.contract_sales_report_query_lns/query');
                $(lnds).query();
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
         var division=''; var division_descrption=''; var bp_id_agent_level1_id=''; var bp_id_agent_level1_desc='';
        //更新时调用
        window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
            debugger;
            if(ds.id=='CONTRACT_SALES_ENTRANCE_AC_F_QUERY__ds'){
                if(name=='division'){
                    division=division+','+value;
                    record.data.division_s=division;
                }
                if(name=='division_n'){
                    division_descrption=division_descrption+value+',';
                    record.data.division_descrption=division_descrption;
                    $jq('[name="division_descrption"]').val(division_descrption)
                }
                if(name=='bp_id_agent_level1'){
                    if(bp_id_agent_level1_id==''){
                        bp_id_agent_level1_id=value;
                    }else {
                        bp_id_agent_level1_id=bp_id_agent_level1_id+','+value;
                    }
                    record.data.bp_id_agent_level1_id=bp_id_agent_level1_id;
                }
                if(name=='bp_id_agent_level1_n'){
                    bp_id_agent_level1_desc=bp_id_agent_level1_desc+value+',';
                    record.data.bp_id_agent_level1_desc=bp_id_agent_level1_desc;
                    $jq('[name="bp_id_agent_level1_desc"]').val(bp_id_agent_level1_desc);
                }
            }
        }
        window['${/parameter/@bp_seq}${/parameter/@layout_code}_RESET_LAYOUT_DYNAMIC_CLICK']=function(){
            for(var i=0;i<window['${/parameter/@bp_seq}${/parameter/@layout_code}_layoutDataSetList'].length;i++){
                if(!$(window['${/parameter/@bp_seq}${/parameter/@layout_code}_layoutDataSetList'][i]).queryurl){
                    $(window['${/parameter/@bp_seq}${/parameter/@layout_code}_layoutDataSetList'][i]).reset();
                    division=''; division_descrption=''; bp_id_agent_level1_id='';  bp_id_agent_level1_desc='';
                    $jq('[name="division_descrption"]').val(division_descrption);
                    $jq('[name="division_s"]').val(division);
                    $jq('[name="bp_id_agent_level1_id"]').val(bp_id_agent_level1_id);
                    $jq('[name="bp_id_agent_level1_desc"]').val(bp_id_agent_level1_desc);
                }
            }
        };
        Leaf.onReady(function(){
           var table= document.getElementById('CONTRACT_SALES_ENTRANCE_AC_G_CONTRACT_RESULT_COPY_hls_journal_detail_layout_grid_id_wrap');
            table.style.display ="none";
        });*/

        function con_contract_query() {
                var headers_ds = $('contract_sales_report_ds');
                var record = headers_ds.getAt(0);
                record.data.division='';
                if(record.data.lease_name10=='Y'){
                    record.data.division=',10';
                }
                if(record.data.lease_name20=='Y'){
                    record.data.division=record.data.division+',20';
                }
                if(record.data.lease_name30=='Y'){
                    record.data.division=record.data.division+',30';
                }
                if(record.data.lease_name40=='Y'){
                    record.data.division=record.data.division+',40';
                }
                if(record.data.lease_name50=='Y'){
                    record.data.division=record.data.division+',50';
                }
                if(record.data.lease_name60=='Y'){
                    record.data.division=record.data.division+',60';
                }
                if(record.data.lease_name70=='Y'){
                    record.data.division=record.data.division+',70';
                };
gzj34291's avatar
gzj34291 committed
107 108 109 110 111
            if(record.data.lease_name80=='Y'){
                record.data.division=record.data.division+',80';
            };
            if(record.data.lease_name90=='Y'){
                record.data.division=record.data.division+',90';
112 113 114
            };
            if(record.data.lease_name91=='Y'){//addby xsh35973 20221011 I-12357新增产品线
                record.data.division=record.data.division+',91';
gzj34291's avatar
gzj34291 committed
115 116 117
            };
            if(record.data.lease_name92=='Y'){//add by gzj
                record.data.division=record.data.division+',92';
118 119 120
            };
            if(record.data.lease_name99=='Y'){//add by gzj
                record.data.division=record.data.division+',99';
gzj34291's avatar
gzj34291 committed
121
            };
122 123 124 125 126 127 128 129 130 131 132 133 134
                record.data.division=record.data.division.substr(1,record.data.division.length);
            $('contract_sales_result_ds').query();
            $('contract_sales_agent_result_ds').query();
        }

        function con_contract_reset() {
            $('contract_sales_report_ds').reset();
        }
        function formatDate(value, record, name, config_record) {
            if (name == 'journal_date') {
                return /\d{4}-\d{1,2}-\d{1,2}/g.exec(value);
            }
        }
135
        ]]></script>
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
        <a:dataSets>
            <a:dataSet id="business_type_n_ds">
                <a:datas>
                    <a:record code_value="LEASE" code_value_name="直租"/>
                    <a:record code_value="LEASEBACK" code_value_name="售后回租"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="contract_sales_report_ds"  autoPageSize="true">
                <a:fields>
                    <a:field name="bp_agent_name"/>
                    <a:field name="journal_num"/>
                    <a:field name="journal_date"/>
                    <a:field name="journal_date_from"/>
                    <a:field name="journal_date_to"/>
                    <a:field name="division"/>
                    <a:field name="division_n"/>
                    <a:field name="contract_number"/>
                    <a:field name="business_type"/>
                    <a:field name="business_type_n" displayField="code_value_name" options="business_type_n_ds"
                             returnField="business_type" valueField="code_value"/>
                    <a:field name="extra_nam" lovGridHeight="350" lovHeight="500" lovService="cont.CON3400.hls_bp_master_for_lov?bp_category=AGENT" lovWidth="800" displayField="bp_name" valueField="bp_id">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="extra_nam" to="extra_nam"/>
                            <a:map from="bp_name" to="bp_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_id"/>
                    <a:field name="bp_name"/>
                    <a:field name="bp_tenant_code"/>
                    <a:field name="bp_tenant_name"/>
                    <a:field name="modelcd"/>
                    <a:field name="pattern"/>
                    <a:field name="machine_number"/>
                    <a:field name="sale_amount"/>
                    <a:field name="sale_penalty"/>
                    <a:field name="sale_other"/>

                    <a:field name="agent_name"/>
                    <a:field name="vender_name"/>
                    <a:field name="sale_amount"/>
                    <a:field name="sale_penalty"/>
                    <a:field name="sale_other"/>
                    <a:field name="sum_total"/>

                    <a:field name="brand_value"/>
                    <a:field name="using_hour"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="contract_sales_result_ds" model="cont.CON3400.contract_sales_report_query_lns" autoPageSize="true" queryDataSet="contract_sales_report_ds" autoQuery="true"/>
            <a:dataSet id="contract_sales_agent_result_ds" model="cont.CON3400.contract_sales_report_query"  autoPageSize="true" queryDataSet="contract_sales_report_ds" autoQuery="true"/>

        </a:dataSets>

        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="con_contract_query" text="HLS.QUERY"/>
                <a:gridButton click="con_contract_reset" text="HLS.RESET"/>
            </a:screenTopToolbar>

            <a:form bindTarget="contract_sales_report_ds" column="4" title="销售收入查询" marginWidth="40">
                <a:datePicker name="journal_date_from" bindTarget="contract_sales_report_ds" prompt="记账日期从"/>
                <a:datePicker name="journal_date_to" bindTarget="contract_sales_report_ds" prompt="记账日期到"/>
                <a:comboBox name="business_type_n" bindTarget="contract_sales_report_ds" prompt="业务类型"/>
                <a:multiLov name="extra_nam" displayField="extra_nam" valueField="bp_id"
                            bindTarget="contract_sales_report_ds"  prompt="代理店"
                            lovWidth="300" lovHeight="300" lovGridHeight="300" title="代理店lov"  width="400"/>
                <a:checkBox name="lease_name10" bindTarget="contract_sales_report_ds" prompt="国产挖机"/>
                <a:checkBox name="lease_name20" bindTarget="contract_sales_report_ds" prompt="进口挖机"/>
                <a:checkBox name="lease_name30" bindTarget="contract_sales_report_ds" prompt="高空作业车"/>
                <a:checkBox name="lease_name50" bindTarget="contract_sales_report_ds" prompt="星邦高空作业车"/>
                <a:checkBox name="lease_name60" bindTarget="contract_sales_report_ds" prompt="新业务"/>
208 209
<!--                <a:checkBox name="lease_name70" bindTarget="contract_sales_report_ds" prompt="铁甲业务"/>-->
                <a:checkBox name="lease_name70" bindTarget="contract_sales_report_ds" prompt="二手机业务"/>
gzj34291's avatar
gzj34291 committed
210
                <a:checkBox name="lease_name80" bindTarget="contract_sales_report_ds" prompt="叉车"/>
211 212
<!--                <a:checkBox name="lease_name90" bindTarget="contract_sales_report_ds" prompt="租赁二手机"/>-->
                <a:checkBox name="lease_name90" bindTarget="contract_sales_report_ds" prompt="租赁二手机(日立)"/>
213
                <a:checkBox name="lease_name40" bindTarget="contract_sales_report_ds" prompt="其它"/>
214
                <a:checkBox name="lease_name91" bindTarget="contract_sales_report_ds" prompt="神钢建机"/>//addby xsh35973 20221011 I-12357新增产品线
215
                <a:checkBox name="lease_name92" bindTarget="contract_sales_report_ds" prompt="北京心诚"/>
216
                <a:checkBox name="lease_name99" bindTarget="contract_sales_report_ds" prompt="工程机械"/>
217
             </a:form>
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

            <a:grid id="contract_sales_result_ds_grid" bindTarget="contract_sales_result_ds" marginHeight="150" navBar="true" marginWidth="40">
                <a:columns>
                    <a:column name="bp_agent_name"  prompt="代理店"  align="center" width="220"/>
                    <a:column name="journal_num"  prompt="凭证编号"  align="center" width="220"/>
                    <a:column name="journal_date"  prompt="记账日期"  align="center" width="220" renderer="formatDate"/>
                    <a:column name="division_n"  prompt="租赁物"  align="center" width="220"/>
                    <a:column name="contract_number"  prompt="合同编号"  align="center" width="220"/>
                    <a:column name="business_type_n"  prompt="业务类型"  align="center" width="220"/>
                    <a:column name="bp_tenant_code"  prompt="承租人编号"  align="center" width="220"/>
                    <a:column name="bp_tenant_name"  prompt="承租人名称"  align="center" width="220"/>
                    <a:column name="modelcd"  prompt="机型"  align="center" width="220"/>
                    <a:column name="pattern"  prompt="型号"  align="center" width="220"/>
                    <a:column name="machine_number"  prompt="机号"  align="center" width="220"/>
                    <a:column name="brand_value"  prompt="品牌"  align="center" width="220"/>
                    <a:column name="using_hour"  prompt="使用小时数"  align="center" width="220" renderer="Leaf.formatMoney"/>
                    <a:column name="sale_amount"  prompt="销售收入"  align="center" width="220"/>
                    <a:column name="sale_penalty"  prompt="逾期利息收入"  align="center" width="220"/>
                    <a:column name="sale_other"  prompt="其他收入"  align="center" width="220"/>
                </a:columns>
            </a:grid>

            <a:grid id="contract_sales_agent_result_ds_grid" bindTarget="contract_sales_agent_result_ds" marginHeight="150" navBar="true" marginWidth="40">
                <a:columns>
                    <a:column name="agent_name"  prompt="代理店"  align="center" width="220"/>
                    <a:column name="vender_name"  prompt="厂商"  align="center" width="220"/>
                    <a:column name="sale_amount"  prompt="销售收入"  align="center" width="220"/>
                    <a:column name="sale_penalty"  prompt="逾期利息收入"  align="center" width="220"/>
                    <a:column name="sale_other"  prompt="其他收入"  align="center" width="220"/>
                    <a:column name="sum_total"  prompt="合计"  align="center" width="220"/>
                </a:columns>
            </a:grid>
        </a:screenBody>

        <!--<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>-->
253 254
    </a:view>
</a:screen>