con350_change_other_inusurance.lview 3.67 KB
Newer Older
Spencer Chang's avatar
Spencer Chang 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhuxianfei
    $Date: 2018年7月16日 下午2:18:45  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[

        //锁屏
        function lock_window() {
            Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
        }

        //解屏
        function unlock_window() {
            Leaf.Masker.unmask(Ext.getBody());
        }


        //确定
        function con_confirm() {
            //
            var record = $('con_change_other_result_ds').getCurrentRecord();
            lock_window();
            Leaf.request({
                url: '${/request/@context_path}/autocrud/cont.CON350.con350_insurance_result/execute',
                para: {
                    contract_id: '${/parameter/@contract_id}',
                    insurance_method: record.get('insurance_method')
                },
                success: function (res) {
                    Leaf.SideBar.show({
                        msg: '操作成功',
                        duration: 2000
                    });
                    unlock_window();
                    con_cancel();
                },
                error: function () {
                    unlock_window();
                },
                failure: function () {
                    unlock_window();
                },
                sync: true,
                scope: this
            })
            ;
        }
        //取消
        function con_cancel() {
            $('change_other_ins_link_winId').close();
        }

        ]]></script>
        <a:dataSets>
            <a:dataSet id="insurance_method_ds" lookupCode="INSURANCE_METHOD"/>

            <a:dataSet id="con_change_other_result_ds" autoQuery="true" fetchAll="true"
                       model="cont.CON350.con350_insurance_result"
                       queryUrl="${/request/@context_path}/autocrud/cont.CON350.con350_insurance_result/query?contract_id=${/parameter/@contract_id}"
                       selectable="false">
                <a:fields>
                    <a:field name="contract_number" readOnly="true"/>
                    <a:field name="bp_id_tenant_n" readOnly="true"/>
                    <a:field name="insurance_method" required="true"/>
                    <a:field name="insurance_method_n" required="true" displayField="code_value_name"
                             options="insurance_method_ds"
                             returnField="insurance_method" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <!--<a:screenTitle/>-->
                <a:gridButton click="con_confirm" text="确定"/>
                <a:gridButton click="con_cancel" text="取消"/>
            </a:screenTopToolbar>
            <a:grid id="con_change_other_result_ds_id" bindTarget="con_change_other_result_ds" width="850" height="200"
                    navBar="true">
                <a:columns>
                    <a:column name="contract_number" prompt="合同编号" width="200"/>
                    <a:column name="bp_id_tenant_n" prompt="客户名" width="200"/>
                    <a:column name="insurance_method_n" prompt="投保方式" editor="cb_id" width="200"/>
                </a:columns>
                <a:editors>
                    <a:numberField id="nf_id" allowDecimals="true" allowNegative="false"/>

                    <a:comboBox id="cb_id"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>