<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('分配资源')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-account-edit">
            <div class="form-group">
                <label class="col-sm-8 control-label is-required">请选择要分配资源的组装（一旦分配无法撤回）</label>
            </div>
            <div class="form-group">
                <div class="col-sm-8">
                    <select class="form-control" id="sid" th:with="type=${comList}">
                        <option value="">所有</option>
                        <option th:each="com : ${type}" th:text="${com.name}" th:value="${com.sid}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-8 control-label is-required">注：若将要分配资源的组织还未创建账号，请点击创建企业账号</label>
            </div>

    	</form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var pageParam = parent.pageParam;

	    var prefix = ctx + "manage/order";

        function submitHandler() {
            var sid = $('#sid').val();
            if(sid == ''){
                $.modal.alertWarning("未选择将要分配资源的组织");
                return;
            }
            $.operate.save(prefix + "/allocation-resource", {"comOrderId" : pageParam.row.comOrderId
                ,"assignedOrgId" : sid.split(',')[0]
                , "assignedOrgType" : sid.split(',')[1]});
        }
    </script>
</body>
</html>
