update_contract_number.lview 3.11 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Administrator  
    $Date: 2016-5-11 上午10:30:26  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="prj505_update_con_number_link_id" model="prj.PRJ505.prj_project_quotation" modelaction="insert"/>
        <script type="text/javascript"><![CDATA[
 function prj505_update_con_number_return(){
           $('${/parameter/@winid}').close();
       }
 
  function prj505_update_con_number(){
           if($('update_contract_number_ds').validate()){
               var record=$('update_contract_number_ds').getAt(0);              
                Leaf.showConfirm('${l:HLS.PROMPT}', '确认更改合同序号吗?', function() {
                    Leaf.Masker.mask($('${/parameter/@winid}').wrap, '正在执行');
                    Leaf.request({
                        url: $('prj505_update_con_number_link_id').getUrl(),
                        para: {
                            quotation_id: '${/parameter/@quotation_id}',
                            update_contract_number:record.get('update_contract_number')
                        },
                        scope: this,
                        success: function() {
                              Leaf.SideBar.show({
                                msg: '操作成功',
                                duration: 2000
                            });
                             Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
                             $('${/parameter/@winid}').close();
                        },
                        failure: function() {
                            Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
                        },
                        error: function() {
                           Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
                        }
                    });
                });
           }
           
       }
 ]]></script>
        <a:dataSets>
            <a:dataSet id="update_contract_number_ds" autoCreate="true">
                <a:fields>
                    <a:field name="contract_number" defaultValue="${/parameter/@contract_number}" readOnly="true"/>
                    <a:field name="update_contract_number" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="prj505_update_con_number_return" text="退出"/>
                <a:gridButton click="prj505_update_con_number" text="更新合同序号"/>
            </a:screenTopToolbar>
            <a:form labelSeparator="" labelWidth="150" title="合同序号(合同号-两位流水序号)">
                <a:textField name="contract_number" bindTarget="update_contract_number_ds" prompt="原合同序号" width="200"/>
                <a:textField name="update_contract_number" bindTarget="update_contract_number_ds" prompt="更新后合同序号" width="200"/>
            </a:form>
        </a:screenBody>
    </a:view>
</a:screen>