business_contact_approve.lview 3.5 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
	&author:zwg
	$date:2018/08/21
	$purpose:业务联络函的审批
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <style>
            .graphic_tool {
                border: 1px solid #CCC;
                background-color: #EEE;
                cursor: pointer;
                overflow: visible;
            }

            .graphic_background .win-content {
                background-color: #CCC;
                overflow: auto;
            }
        </style>
        <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>-->

        <a:screenBody>
            <script type="text/javascript"><![CDATA[
            var header = $jq('meta[name=_csrf_header]').attr('content');
            $jq(document).ajaxSend(function (e, xhr, options) {
                xhr.setRequestHeader(header, '${/session/@_csrf.token}');
            });

            function approveNotice(status) {
                var confirmRemark = document.getElementById("confirmRemark").value;
                var data = {
                    businessStatus: status,
                    businessConfirmDescription: confirmRemark,
                    businessId: '${/parameter/@business_id}'
                };

                $jq.ajax({
                    url: '${/request/@context_path}/business/contacts/approvenotice',
                    method: 'post',
                    dataType: "json",
                    contentType: 'application/json;charset=UTF-8',
                    data: JSON.stringify(data),
                    success: function (args) {
                        if (args.success) {
                            unlock_window();
                            Leaf.SideBar.show({
                                msg: '提交成功',
                                duration: 2000
                            });
                            businessApproveWin.close();
                            $('letter_approval').hide()
                            // businessQueryWin.close();
                        }
                    },
                    failure: function () {
                        unlock_window();
                        Leaf.SideBar.show({
                            msg: '提交失败',
                            duration: 2000
                        });
                    },
                    error: function () {
                        unlock_window();
                        Leaf.SideBar.show({
                            msg: '提交失败',
                            duration: 2000
                        });
                    },
                    scope: this
                });
            }

            ]]></script>
            <div valign="top"><p>审批意见</p></div>
            <div style="height:80px;">
                <input style="width: 600px; height: 72px" name="confirmRemark" id="confirmRemark"/>
            </div>
            <div style="left:-200px" width="100px">
                <table>
                    <tr>
                        <td width="30px">
                            <button onclick="approveNotice('CONFIRM')" name="button1" value="button">同意</button>
                        </td>
                        <td width="30px">
                            <button onclick="approveNotice('REJECT')" name="button2" value="button">拒绝</button>
                        </td>
                    </tr>
                </table>
            </div>
        </a:screenBody>
    </a:view>
</a:screen>