con706_et_document_info.lview 7.51 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 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhuxianfei
    $Date: 2018/7/5 15:38
    $Revision: 1.0
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view package="leaf.ui.std" template="default">
        <script type="text/javascript"><![CDATA[
        function lock_list_window() {
            Leaf.Masker.mask($('${/parameter/@win_id}').wrap, '${l:HLS.EXECUTING}');
        }

        function unlock_list_window() {
            Leaf.Masker.unmask($('${/parameter/@win_id}').wrap);
        }

        function con706_exit() {
            $('trans_info_modify_link_winId').close();
        }

        function con706_reset() {
            $('contract_doc_query_ds').reset();
        }

        /*var a = '${/parameter/@contract_id}';
         alert(a);*/

        function con706_detail_modify_save() {
            var record = $('contract_doc_info_ds').getCurrentRecord();
            Leaf.request({
                url: '${/request/@context_path}/autocrud/cont.CON706.con_contract_et_result/update',
                para: {
                    contract_id: '${/parameter/@contract_id}',
                    cert_recipient01: record.get('cert_recipient01'),
                    cert_tracknum01: record.get('cert_tracknum01'),
                    cert_send_date01: record.get('cert_send_date01'),

                    cert_recipient02: '',
                    cert_tracknum02: '',
                    cert_send_date02: '',

                    trans_recipient01: record.get('trans_recipient01'),
                    trans_tracknum01: record.get('trans_tracknum01'),
                    trans_send_date01: record.get('trans_send_date01'),

                    trans_recipient02: '',
                    trans_tracknum02: '',
                    trans_send_date02: '',
                    note: record.get('note')


                },
                success: function (res) {
                    Leaf.SideBar.show({
                        msg: '操作成功',
                        duration: 2000
                    });
                },
                error: function () {
                },
                failure: function () {
                }
                ,
                sync: true,
                scope: this
            })
            ;

        }

        function editor_change(record, name) {
            var readonly = '${/parameter/@readonly}';
            if (readonly == 'Y') {
                return '';
            } else {
                if (name == 'cert_recipient01') {
                    return 'tf_id';
                }
                if (name == 'cert_tracknum01') {
                    return 'tf_id';
                }
                if (name == 'cert_send_date01') {
                    return 'dp_id';
                }
                /* if (name == 'cert_recipient02') {
                     return 'tf_id';
                 }
                 if (name == 'cert_tracknum02') {
                     return 'tf_id';
                 }
                 if (name == 'cert_send_date02') {
                     return 'dp_id';
                 }*/
                if (name == 'trans_recipient01') {
                    return 'tf_id';
                }
                if (name == 'trans_tracknum01') {
                    return 'tf_id';
                }
                if (name == 'trans_send_date01') {
                    return 'dp_id';
                }
                /* if (name == 'trans_recipient02') {
                     return 'tf_id';
                 }
                 if (name == 'trans_tracknum02') {
                     return 'tf_id';
                 }
                 if (name == 'trans_send_date02') {
                     return 'dp_id';
                 }*/
                if (name == 'note') {
                    return 'tf_id';
                }

            }
        }

        ]]></script>
        <a:dataSets>
            <a:dataSet id="contract_doc_info_ds" autoQuery="true" fetchAll="true"
                       model="cont.CON706.con_contract_et_result"
                       queryUrl="${/request/@context_path}/autocrud/cont.CON706.con_contract_et_result/query?contract_id=${/parameter/@contract_id}"
                       selectable="true"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="con706_exit" text="HLS.EXIT"/>
                <a:gridButton click="con706_detail_modify_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:grid id="cont_doc_detail_result_ds_id" bindTarget="contract_doc_info_ds" marginHeight="240"
                    marginWidth="40"
                    navBar="true">
                <a:columns>
                    <a:column prompt="合格证">
                        <a:column name="cert_recipient01" align="center" editorFunction="editor_change" prompt="收件人"
                                  width="200"/>
                        <a:column name="cert_tracknum01" align="center" editorFunction="editor_change" prompt="快递单"
                                  width="130"/>
                        <a:column name="cert_send_date01" align="center" editorFunction="editor_change"
                                  renderer="Leaf.formatDate" prompt="邮寄日期" width="130"/>
                    </a:column>
                    <!--<a:column prompt="第二次寄送合格证">
                        <a:column name="cert_recipient02" align="center" editorFunction="editor_change" prompt="收件人2" width="200" />
                        <a:column name="cert_tracknum02" align="center" editorFunction="editor_change" prompt="快递单2" width="130" />
                        <a:column name="cert_send_date02" align="center" editorFunction="editor_change" renderer="Leaf.formatDate"  prompt="邮寄日期2"  width="130"/>
                    </a:column>-->
                    <a:column prompt="所有权转移证书">
                        <a:column name="trans_recipient01" align="center" editorFunction="editor_change" prompt="收件人"
                                  width="200"/>
                        <a:column name="trans_tracknum01" align="center" editorFunction="editor_change" prompt="快递单"
                                  width="130"/>
                        <a:column name="trans_send_date01" align="center" editorFunction="editor_change"
                                  renderer="Leaf.formatDate" prompt="邮寄日期" width="130"/>
                    </a:column>
                    <!--  <a:column prompt="第二次寄送所有权转移证书">
                          <a:column name="trans_recipient02" align="center" editorFunction="editor_change" prompt="收件人2" width="200"/>
                          <a:column name="trans_tracknum02" align="center" editorFunction="editor_change" prompt="快递单2" width="130"/>
                          <a:column name="trans_send_date02" align="center" editorFunction="editor_change" renderer="Leaf.formatDate"  prompt="邮寄日期2"  width="130"/>
                      </a:column>-->
                    <a:column name="note" align="center" editorFunction="editor_change" prompt="备注" width="200"/>
                </a:columns>
                <a:editors>

                    <a:numberField id="nf_id" allowDecimals="false" allowNegative="false"/>
                    <a:textField id="tf_id"/>
                    <a:checkBox id="ck_id"/>
                    <a:datePicker id="dp_id"/>

                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>