audit.html 17.3 KB
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改错误数据撤销申请')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-modify-edit" th:object="${creditExceptionApply}">
<!--            <h4 class="form-header h4">错误数据撤销申请审核</h4>-->
            <!--<input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">撤销类型 双公示:</label>
                <div class="col-sm-8">
                    <select name="applyType" class="form-control m-b" th:with="type=${@dict.getType('eit_pub_type')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{applyType}"></option>
                    </select>
                </div>
            </div>-->
            <input name="id" th:field="*{id}" class="form-control" type="hidden" />
            <div class="form-group">
                <label class="col-sm-3 control-label ">问题类别:</label>
                <div class="col-sm-8">
                    <select name="exceptionType" class="form-control m-b" th:with="type=${@dict.getType('eit_pub_type')}" required disabled>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{exceptionType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">申请内容:</label>
                <div class="col-sm-8">
                    <textarea name="applyContent" class="form-control" disabled>[[*{applyContent}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">申请日期:</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="reportDate" th:value="${#dates.format(creditExceptionApply.reportDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">申请单位,:</label>
                <div class="col-sm-8">
                    <input name="reportDept" th:field="*{reportDeptName}" class="form-control" type="text" disabled>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">校验状态:</label>
                <div class="col-sm-8">
                    <select name="applyStatus" class="form-control m-b" th:with="type=${@dict.getEnum('exception_apply_audit_status')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{applyStatus}"></option>
                    </select>
                </div>
            </div>
            <!--<h4 class="form-header h4">错误数据信息</h4>
            <div class="row">
                <div class="col-sm-12">
                    <button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>
                    <button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
                    <div class="col-sm-12 select-table table-striped">
                        <table id="bootstrap-table"></table>
                    </div>
                </div>
            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "business/modify";
        var dataTypeDatas = [[${@dict.getType('eit_pub_type')}]];
        $("#form-modify-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                console.log($('#form-modify-edit').serialize())
                $.operate.save(prefix + "/audit", $('#form-modify-edit').serialize());
            }
        }

        $("input[name='reportDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        /* $(".file-upload").each(function (i) {
            var val = $("input[name='" + this.id + "']").val()
            $(this).fileinput({
                'uploadUrl': ctx + 'common/upload',
                initialPreviewAsData: true,
                initialPreview: [val],
                maxFileCount: 1,
                autoReplace: true
            }).on('fileuploaded', function (event, data, previewId, index) {
                $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
            }).on('fileremoved', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            })
            $(this).fileinput('_initFileActions');
        });

        $(function() {
            var options = {
                data: [[${creditExceptionApply.creditExceptionDataList}]],
                pagination: false,
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                sidePagination: "client",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'index',
                    align: 'center',
                    title: "序号",
                    formatter: function (value, row, index) {
                    	var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
                    	return columnIndex + $.table.serialNumber(index);
                    }
                },
                {
                    field: 'recoverId',
                    align: 'center',
                    title: '错误数据主键',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].recoverId' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'dataType',
                    align: 'center',
                    title: '错误类型',
                    formatter: function(value, row, index) {
                        var name = $.common.sprintf("creditExceptionDataList[%s].dataType", index);
                        return $.common.dictToSelect(dataTypeDatas, value, name);
                    }
                },
                {
                    field: 'counterpartName',
                    align: 'center',
                    title: '错误主体',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].counterpartName' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'counterpartCode',
                    align: 'center',
                    title: '错误统一社会信用代码',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].counterpartCode' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'counterpartType',
                    align: 'center',
                    title: '错误行政相对人类别',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].counterpartType' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'decisionSequence',
                    align: 'center',
                    title: '文书号',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].decisionSequence' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'decisionCreditCode',
                    align: 'center',
                    title: '错误决定机关统一社会信用代码',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].decisionCreditCode' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'rightCounterpartName',
                    align: 'center',
                    title: '正确主体',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].rightCounterpartName' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'rightCounterpartCode',
                    align: 'center',
                    title: '正确主体统一社会信用代码',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].rightCounterpartCode' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'rightCounterpartType',
                    align: 'center',
                    title: '正确行政相对人类别',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].rightCounterpartType' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'rightDecisionSequence',
                    align: 'center',
                    title: '正确文书号',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].rightDecisionSequence' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'rightDecisionCreditCode',
                    align: 'center',
                    title: '正确决定机关统一社会信用代码',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].rightDecisionCreditCode' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'handleStatus',
                    align: 'center',
                    title: '修复状态',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].handleStatus' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'applyTime',
                    align: 'center',
                    title: '申请时间',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].applyTime' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'applyUser',
                    align: 'center',
                    title: '申请人',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].applyUser' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'applyDept',
                    align: 'center',
                    title: '申请单位',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].applyDept' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'delFlag',
                    align: 'center',
                    title: '删除标志',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].delFlag' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'createBy',
                    align: 'center',
                    title: '上传人',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].createBy' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'createTime',
                    align: 'center',
                    title: '创建时间',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].createTime' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    field: 'updateTime',
                    align: 'center',
                    title: '更新时间',
                    formatter: function(value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='creditExceptionDataList[%s].updateTime' value='%s'>", index, value);
                        return html;
                    }
                },

                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
                        return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
                    }
                }]
            };
            $.table.init(options);
        });

        function addRow() {
            var count = $("#" + table.options.id).bootstrapTable('getData').length;
            var row = {
                index: $.table.serialNumber(count),
                recoverId: "",
                dataType: "",
                counterpartName: "",
                counterpartCode: "",
                counterpartType: "",
                decisionSequence: "",
                decisionCreditCode: "",
                rightCounterpartName: "",
                rightCounterpartCode: "",
                rightCounterpartType: "",
                rightDecisionSequence: "",
                rightDecisionCreditCode: "",
                handleStatus: "",
                applyTime: "",
                applyUser: "",
                applyDept: "",
                delFlag: "",
                createBy: "",
                createTime: "",
                updateTime: "",
            }
            sub.addRow(row);
        }*/
        /*$(function () {
            let id = $("#treedId").val();
            let name = $("#treedName").val();
            fetch("",{
                method: 'post',
                headers:{
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify({
                    "id":id,
                    "name": name
                })
            }).then(response => {
                if()
            })
        })*/
    </script>
</body>
</html>