<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <base href="#springUrl('/assets/adminlte/')"/>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>工作台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="plugins/ionicons/css/ionicons.min.css">

    <!-- DataTables -->
    <link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">

    <!-- Theme style -->
    <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="plugins/iCheck/flat/blue.css">
    <!-- Date Picker -->
    <link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <!--validate css-->
    <link rel="stylesheet" href="plugins/jquery-validation/css/validate.css">
    <!--fileinput css-->
    <link rel="stylesheet" href="plugins/fine-uploader/css/fine-uploader-new.css">
    <!-- Select2 -->
    <link rel="stylesheet" href="plugins/select2/select2.min.css">
    <!-- ztree css -->
    <link rel="stylesheet"
          href="plugins/ztree/css/metroStyle/metroStyle.css" type="text/css"/>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]> -->
    <script src="plugins/fine-uploader/javascript/fine-uploader.min.js"></script>
    <script type="text/template" id="qq-template-manual-trigger">
        <div class="qq-uploader-selector qq-uploader" qq-drop-area-text="文件显示区">
            <div class="qq-total-progress-bar-container-selector qq-total-progress-bar-container">
                <div role="progressbar" aria-valuenow="0" aria-valuemin="0"
                     aria-valuemax="100"
                     class="qq-total-progress-bar-selector qq-progress-bar qq-total-progress-bar"></div>
            </div>
            <div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
                <span class="qq-upload-drop-area-text-selector"></span>
            </div>
            <div class="buttons">
                <div class="qq-upload-button-selector qq-upload-button" style="width: 120px;">
                    <div><i class="fa fa-upload"></i> 选择文件</div>
                </div>
                <button type="button" id="trigger-upload" class="btn btn-primary">
                    <i class="fa fa-cloud-upload"></i> 上传
                </button>
            </div>
            <span class="qq-drop-processing-selector qq-drop-processing">
                <span>Processing dropped files...</span>
                <span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
            </span>
            <!--            <ul class="qq-upload-list-selector qq-upload-list" aria-live="polite"  aria-relevant="additions removals">-->
            <!--                <li>-->
            <!--                    <div class="qq-progress-bar-container-selector">-->
            <!--                        <div role="progressbar" aria-valuenow="0" aria-valuemin="0"-->
            <!--                             aria-valuemax="100"-->
            <!--                             class="qq-progress-bar-selector qq-progress-bar"></div>-->
            <!--                    </div>-->
            <!--                    <span class="qq-upload-spinner-selector qq-upload-spinner"></span>-->
            <!--                    <img class="qq-thumbnail-selector" qq-server-scale>-->
            <!--                    &lt;!&ndash;<span class="qq-upload-file-selector qq-upload-file"></span>-->
            <!--                    <span class="qq-edit-filename-icon-selector qq-edit-filename-icon"-->
            <!--                          aria-label="Edit filename"></span>-->
            <!--                    <input class="qq-edit-filename-selector qq-edit-filename" tabindex="0"-->
            <!--                           type="text">&ndash;&gt;-->
            <!--                    <span class="qq-upload-size-selector qq-upload-size"></span>-->
            <!--                    <button type="button"-->
            <!--                            class="qq-btn qq-upload-cancel-selector qq-upload-cancel">-->
            <!--                        <i class="fa fa-fw  fa-trash-o"></i>-->
            <!--                    </button>-->
            <!--                    <button type="button"-->
            <!--                            class="qq-btn qq-upload-retry-selector qq-upload-retry">Retry-->
            <!--                    </button>-->
            <!--                    <button type="button"-->
            <!--                            class="qq-btn qq-upload-delete-selector qq-upload-delete">Delete-->
            <!--                    </button>-->
            <!--                    <span role="status"-->
            <!--                          class="qq-upload-status-text-selector qq-upload-status-text"></span>-->
            <!--                </li>-->
            <!--            </ul>-->
            <ul class="qq-upload-list-selector qq-upload-list" role="region" aria-live="polite"
                aria-relevant="additions removals">
                <li style="margin: 5px;">
                    <span role="status" class="qq-upload-status-text-selector qq-upload-status-text"></span>
                    <div class="qq-progress-bar-container-selector qq-progress-bar-container">
                        <div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"
                             class="qq-progress-bar-selector qq-progress-bar"></div>
                    </div>
                    <span class="qq-upload-spinner-selector qq-upload-spinner"></span>
                    <div class="qq-thumbnail-wrapper">
                        <a href="javascript:void (0);" onclick="deleteImg(this)" class="qq-hide delete-img"
                           style="float: right;">删除</a>
                        <img class="qq-thumbnail-selector" qq-max-size="120" qq-server-scale>
                    </div>
                    <button type="button" class="qq-upload-cancel-selector qq-upload-cancel">X</button>
                    <button type="button" class="qq-upload-retry-selector qq-upload-retry">
                        <span class="qq-btn qq-retry-icon" aria-label="Retry"></span>
                        Retry
                    </button>

                    <div class="qq-file-info">
                        <div class="qq-file-name">
                            <span class="qq-upload-file-selector qq-upload-file"></span>
                        </div>
                        <span class="qq-upload-size-selector qq-upload-size"></span>
                    </div>
                </li>
            </ul>
            <dialog class="qq-alert-dialog-selector">
                <div class="qq-dialog-message-selector"></div>
                <div class="qq-dialog-buttons">
                    <button type="button" class="qq-cancel-button-selector">Close</button>
                </div>
            </dialog>

            <dialog class="qq-confirm-dialog-selector">
                <div class="qq-dialog-message-selector"></div>
                <div class="qq-dialog-buttons">
                    <button type="button" class="qq-cancel-button-selector">No</button>
                    <button type="button" class="qq-ok-button-selector">Yes</button>
                </div>
            </dialog>

            <dialog class="qq-prompt-dialog-selector">
                <div class="qq-dialog-message-selector"></div>
                <input type="text">
                <div class="qq-dialog-buttons">
                    <button type="button" class="qq-cancel-button-selector">Cancel</button>
                    <button type="button" class="qq-ok-button-selector">Ok</button>
                </div>
            </dialog>
        </div>
    </script>
    <![endif]-->
    <style>
        #trigger-upload {
            color: white;
            background-color: #3c8dbc;
            font-size: 14px;
            padding: 7px 20px;
            background-image: none;
        }

        #fine-uploader-manual-trigger .qq-upload-button {
            margin-right: 15px;
            background-color: #3c8dbc;
        }

        #fine-uploader-manual-trigger .buttons {
            width: 36%;
        }

        #fine-uploader-manual-trigger .qq-uploader .qq-total-progress-bar-container {
            width: 60%;
        }

        /*lisw 2017-09-05*/
        .qq-thumbnail-selector {
            height: 160px;
            width: auto;
            border: 1px solid #ddd;
            box-shadow: 1px 1px 5px 0 #a2958a;
            padding: 10px 10px 30px 10px;
        }

        .qq-upload-list li {
            float: left;
            position: relative;
        }

        .qq-upload-cancel-selector {
            position: absolute;
            bottom: 15px;
            right: 15px;
        }

        .qq-upload-cancel-selector {
            background-color: transparent;
            border: 1px;
        }

        .qq-upload-cancel-selector i {
            color: red;
        }
    </style>
</head>
<!-- END HEAD -->
<body class="hold-transition skin-blue sidebar-mini">

<div class="wrapper">
    <div class="content-wrapper" style="margin-left:0;">

        <section class="content-header">
            <h1>
                品牌管理
                <small>品牌成品管理</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
                <li><a class="active">品牌管理</a></li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <!-- general form elements disabled -->
                    <div class="box box-primary">
                        <form role="form" id="qq-form" method="post">
                            <input name="id" value="$!{data.id}" hidden="true"/>
                            <input name="applyId" id="applyId" value="$!{applyId}" hidden="true"/>
                            <div class="box-body">
                                <div class="form-group form-md-line-input">
                                    <label>文件名称</label>
                                    <input type="text"
                                           class="form-control" name="name"
                                           id="name"
                                           maxlength="100" placeholder="文件名称"
                                           value="$!{data.name}"
                                           required="required"
                                    >
                                </div>
                                <div class="form-group form-md-line-input">
                                    <label>标签</label>
                                    <input type="text"
                                           class="form-control" name="label"
                                           id="label"
                                           maxlength="100" placeholder="标签"
                                           value="$!{data.label}"
                                    >
                                </div>
                                <div class="form-group form-md-line-input">
                                <label>部门盘链接</label>
                                <input type="text"
                                       class="form-control" name="filePrefix"
                                       id="filePrefix"
                                       maxlength="100" placeholder="部门盘链接"
                                       value="$!{data.filePrefix}"
                                >
                                </div>
                                <div style="display: none;" class="form-group form-md-line-input">
                                    <label>文件存储位置</label>
                                    <select name="cosconfigId" id="cosconfigId" class="form-control">
                                        <!--<option value="0">本地</option>-->
                                        #foreach($cosconfig in $cosconfigList)
                                        #if($cosconfig.cosType == "qcloud")
                                        <option value="$cosconfig.id">腾讯</option>
                                        #end
                                        #if($cosconfig.cosType == "ali")
                                        <option value="$cosconfig.id">阿里</option>
                                        #end
                                        #if($cosconfig.cosType == "qiniu")
                                        <option value="$cosconfig.id">七牛</option>
                                        #end
                                        #end
                                    </select>
                                </div>
                                <div class="form-group form-md-line-input">
                                    <!--                                    <label>文件类型（多选）</label>-->
                                    <!--                                    <select class="form-control select2 role" style="width:100%;"-->
                                    <!--                                            multiple="multiple" data-placeholder="请选择文件类型（多选）">-->
                                    <!--                                        <option value="jpg">jpg</option>-->
                                    <!--                                        <option value="png">png</option>-->
                                    <!--                                        <option value="jpeg">jpeg</option>-->
                                    <!--                                        <option value="doc">doc</option>-->
                                    <!--                                        <option value="docx">docx</option>-->
                                    <!--                                        <option value="xls">xls</option>-->
                                    <!--                                        <option value="xlsx">xlsx</option>-->
                                    <!--                                        <option value="zip">zip</option>-->
                                    <!--                                        <option value="mp3">mp3</option>-->
                                    <!--                                        <option value="mp4">mp4</option>-->
                                    <!--                                        <option value="3gp">3gp</option>-->
                                    <!--                                        <option value="txt">txt</option>-->
                                    <!--                                        <option value="pdf">pdf</option>-->
                                    <!--                                    </select>-->
                                    <label>文件类型（多选）</label>
                                    <div class="switch">
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="mp4"/><label class="custom-control-label">&nbsp;mp4</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="mov"/><label class="custom-control-label">&nbsp;mov</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="wmv"/><label class="custom-control-label">&nbsp;wmv</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="avi"/><label class="custom-control-label">&nbsp;avi</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="3gp"/><label class="custom-control-label">&nbsp;3gp</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="mp3"/><label class="custom-control-label">&nbsp;mp3</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="jpg"/><label class="custom-control-label">&nbsp;jpg</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format" value="jpeg"/><label
                                            class="custom-control-label">&nbsp;jpeg</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="tif"/><label class="custom-control-label">&nbsp;tif</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="gif"/><label class="custom-control-label">&nbsp;gif</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="png"/><label class="custom-control-label">&nbsp;png</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="pdf"/><label class="custom-control-label">&nbsp;pdf</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="ppt"/><label class="custom-control-label">&nbsp;ppt</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format" value="pptx"/><label
                                            class="custom-control-label">&nbsp;pptx</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="txt"/><label class="custom-control-label">&nbsp;txt</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="doc"/><label class="custom-control-label">&nbsp;doc</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="xls"/><label class="custom-control-label">&nbsp;xls</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format" value="docx"/><label
                                            class="custom-control-label">&nbsp;docx</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format" value="xlsx"/><label
                                            class="custom-control-label">&nbsp;xlsx</label>&nbsp;
                                        <input class="custom-control-input" type="checkbox" name="format"
                                               value="zip"/><label class="custom-control-label">&nbsp;zip</label>&nbsp;
                                    </div>
                                </div>
                                <div id="fine-uploader-manual-trigger"></div>
                                <div class="box-footer">
                                    <input class="btn btn-primary" id="save" value="保存" style="width: 60px;">
                                    <a href="#springUrl('/a/brandApply/list')" class="btn btn-default">取消</a>
                                    <!--                                    &lt;!&ndash;<button class="btn btn-primary" id="uploadBtn">上传</button>&ndash;&gt;-->
                                </div>
                            </div>
                        </form>
                        <!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->


    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- ztree -->
<script src="plugins/ztree/js/jquery.ztree.all.min.js"
        type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="common/js/cfapp.js"></script>
<script>
    var delFileUrlArr = [];
    var fileUrlArr = [];
    var formatArr = [];

    var manualUploader = new qq.FineUploader({
        element: document.getElementById('fine-uploader-manual-trigger'),
        template: 'qq-template-manual-trigger',
        request: {
            // endpoint: "#springUrl('/a/brandApplyProduct/fileUpload')" + "?_csrf=${_csrf.token}&_csrf_header=${_csrf.headerName}&applyId=" + $('#applyId').val() + "&cosconfigId=" + $('#cosconfigId').val()
            endpoint: "#springUrl('/a/brandApplyProduct/fileUpload')" + "?_csrf=${_csrf.token}&_csrf_header=${_csrf.headerName}&applyId=" + $('#applyId').val() + "&cosconfigId=3"
        },
        thumbnails: {
            placeholders: {
                waitingPath: 'plugins/fine-uploader/img/waiting-generic.png',
                notAvailablePath: 'plugins/fine-uploader/img/not_available-generic.png'
            }
        },
        autoUpload: false,
        debug: false,
        disableCancelForFormUploads: true,
        editFilename: { //编辑名字
            enable: true
        },
        text: {
            uploadButton: '上传'
        },
        validation: {
            //控制上传文件的后缀格式数组
            allowedExtensions: ['mp4', 'mov', 'wmv,avi,3gp', 'mp3', 'jpg', 'jpeg', 'tif', 'gif', 'png', 'pdf', 'ppt', 'pptx', 'txt', 'doc', 'xls', 'docx', 'xlsx', 'zip'],
            //控制上传文件大小
            sizeLimit: 100000 * 1024 // 50M
        },
        maxConnections: 1,
        callbacks: {
            //点击删除时触发
            onSubmitDelete: function (id) {
                //取出对应id的uuid属性，并自定义上传参数名称为fileName
                console.log("触发了删除操作   " + id);
                // this.setDeleteFileParams({fileName: this.getUuid(id)}, id);
            },
            onSubmit: function (id, fileName) {
                let name = $('#name').val();
                if (name == '' || name == undefined) {
                    $('#name').val(fileName);
                }
                var format = fileName.substring(fileName.lastIndexOf('.') + 1);
                $("input[type='checkbox'][name='format'][value='" + format + "']").attr("checked", true);
                // formatArr.push(format);
                // $('.select2').val(formatArr).trigger('change');
            },
            onComplete: function (id, fileName, responseJSON) {
                if (responseJSON.success) {
                    fileUrlArr.push(responseJSON.fileUrl);
                    let fileJSON = {
                        key: id,
                        value: responseJSON.fileUrl
                    }
                    delFileUrlArr.push(fileJSON);
                    $('.delete-img').each(function () {
                        if ($(this).hasClass('qq-hide')) {
                            $(this).removeClass('qq-hide')
                        }
                    })
                    console.log(delFileUrlArr);
                } else {
                    Cfapp.alert({
                        message: "文件上传失败",
                        btntext: "确定",
                        success: function () {
                            // location.href = "#springUrl('/a/materialUpload/list')";
                        }
                    });
                }
            },
            onDelete: function (id) {
                // ...
            },
            onDeleteComplete: function (id, xhr, isError) {
                //...
            },
            onAllComplete: function (id, name) {
                // Cfapp.confirm({
                //     message: "创建成功",
                //     // btnoktext: "继续创建",
                //     btncanceltext: "返回品牌申请",
                //     success: function () {
                //         // location.href = "#springUrl('/a/brandApplyProduct/form')" + "?applyId=" + $("#applyId").val();
                //     },
                //     cancel: function () {
                //         location.href = "#springUrl('/a/brandApply/list')";
                //     }
                // });
            }
        }
    });
    qq(document.getElementById("trigger-upload")).attach("click", function () {
        manualUploader.uploadStoredFiles();
    });
</script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/extensions/i18n/lanauage_ch.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.min.js"></script>
<script src="plugins\bootstrap-fileinput\fileinput.js"></script>
<script src="plugins/bootstrap-fileinput/zh.js"></script>
<!-- Select2 -->
<script src="plugins/select2/select2.full.min.js"></script>
<!--fileinput js-->
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<script src="plugins/bootstrap-maxlength/bootstrap-maxlength.min.js" type="text/javascript"></script>
<script src="plugins/security/sha256.js" type="text/javascript"></script>
<script src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<script src="plugins/jquery-validation/js/localization/messages_zh.js"></script>
<script src="js/jquery.form.min.js"></script>
<script src="js/jquery.serializejson.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>

    $(".select2").select2();

    function submitForm() {
        return $("#qq-form").validate({
            rules: {},
            messages: {},
        })
    }

    $('#save').on('click', function () {
        if (fileUrlArr.length == 0) {
            Cfapp.alert({
                message: "请上传文件",
                btntext: "确定",
                success: function () {
                }
            });
            return false;
        }
        if (delFileUrlArr.length == 0) {
            Cfapp.alert({
                message: "请上传文件",
                btntext: "确定",
                success: function () {
                }
            });
            return false;
        }
        if (submitForm()) {
            $("#save").attr("disabled", true);
            var dataJson = $("#qq-form").serializeJSON();
            let formatArr = [];
            $("input[type='checkbox'][name='format']:checked").each(function (index, element) {
                formatArr.push($(this).val());
            });
            dataJson.format = formatArr.join(',');
            // var format = $(".select2").select2("val");
            // dataJson.format = format.join(',');
            dataJson.fileUrl = fileUrlArr.join(',');
            $.getJSON("#springUrl('/a/brandApplyProduct/formData')", dataJson, function (returnobj) {
                $("#save").attr("disabled", false);
                if (returnobj.errorNo == 2) {  //保存成功
                    Cfapp.confirm({
                        message: "添加成功",
                        // btnoktext: "继续添加",
                        btncanceltext: "关闭",
                        success: function () {
                            location.href = "#springUrl('/a/brandApply/list')";
                        },
                        cancel: function () {
                            location.href = "#springUrl('/a/brandApply/list')";
                        }
                    });
                } else if (returnobj.errorNo == 0) {  //修改成功
                    Cfapp.alert({
                        message: "更新成功",
                        btntext: "确定",
                        success: function () {
                            location.href = "#springUrl('/a/brandApply/list')";
                        }
                    });
                } else {
                    Cfapp.alert({
                        message: "创建失败",
                        btntext: "确定",
                        success: function () {
                            location.href = "#springUrl('/a/brandApply/list')";
                        }
                    });
                }
            });
        }
    })

    var formatArrValue = "${data.format}";
    $('.select2').val(formatArrValue.split(',')).trigger('change');

    /**
     * 删除图片操作
     */
    deleteImg = function (element) {
        var qqFileId = $(element).parent().parent().attr('qq-file-id');
        let fileUrl = "";
        let fileIndex = -1;
        delFileUrlArr.forEach((value, index, array) => {
            if (value.key == qqFileId) {
                fileUrl = value.value;
                fileIndex = index;
            }
        })
        var dataForm = $("#qq-form").serializeJSON();
        let dataJson = {
            id: dataForm.applyId,
            fileUrl: fileUrl
        }
        $.getJSON("#springUrl('/a/brandApplyProduct/fileDelete')", dataJson, function (returnobj) {
            if (returnobj.errorNo == 0) {  // 删除成功
                if (fileIndex != -1) {
                    delFileUrlArr.splice(fileIndex, 1);
                }
                $('.qq-file-id-' + qqFileId).remove();
                Cfapp.alert({
                    message: "删除成功",
                    btntext: "确定",
                    success: function () {

                    }
                });
            } else {
                Cfapp.alert({
                    message: "创建失败",
                    btntext: "确定",
                    success: function () {

                    }
                });
            }
        });
    }

</script>

</body>
<!-- END BODY -->
</html>