|
@@ -0,0 +1,246 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>订单备注</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <style>
|
|
|
+ .form-horizontal .controls {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dateInput input {
|
|
|
+ width: 150px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .clause span {
|
|
|
+ margin-left: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #productTable th {
|
|
|
+ text-align: center;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+
|
|
|
+ #productTable td {
|
|
|
+ text-align: center;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+ .controls{
|
|
|
+ font-size: 0;
|
|
|
+ }
|
|
|
+ .controls .conList{
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 15px;
|
|
|
+ }
|
|
|
+ .conList .btn:nth-of-type(1){
|
|
|
+ margin-left: 25px;
|
|
|
+ }
|
|
|
+ .upload-content {
|
|
|
+ margin-top: -70px;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) {
|
|
|
+ width: 90px;
|
|
|
+ height: 100px;
|
|
|
+ border: 2px solid #eee;
|
|
|
+ background: #fff;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1)>div {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) span {
|
|
|
+ font-size: 35px;
|
|
|
+ }
|
|
|
+ .upload-content .conList .btn:nth-of-type(1) h5 {
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .cancel-upload {
|
|
|
+ background: transparent;
|
|
|
+ border: none;
|
|
|
+ box-shadow: none;
|
|
|
+ position: relative;
|
|
|
+ top: -38px;
|
|
|
+ left: -25px;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 100;
|
|
|
+ }
|
|
|
+ .upload-content .conList ol li {
|
|
|
+ width: 114px;
|
|
|
+ min-height: 80px;
|
|
|
+ text-align: center;
|
|
|
+ background: #fff;
|
|
|
+ position: relative;
|
|
|
+ top: 120px;
|
|
|
+ margin-left: 2px;
|
|
|
+ }
|
|
|
+ .hide-pic {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+ #file-list-display p .del {
|
|
|
+ color: #2fa4e7;
|
|
|
+ font-size: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function() {
|
|
|
+ $("#inputForm").validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ var remarks = $("#remarks").val();
|
|
|
+ if(remarks != undefined && remarks.trim() != ""){
|
|
|
+
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ }else {
|
|
|
+ alertx("请填写备注!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $("#messageBox").text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<ul class="nav nav-tabs">
|
|
|
+ <li><a href="${ctx}/new/user/agency/">机构列表</a></li>
|
|
|
+ <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
|
|
|
+ <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
|
|
|
+ <li class="active"><a href="${ctx}/new/user/agency/recordLinkage?clubId=${clubId}">生成行为记录链接</a></li>
|
|
|
+</ul><br/>
|
|
|
+<br/>
|
|
|
+<form:form id="inputForm" modelAttribute="cmOrderRemark" action="${ctx}/order/cmOrderRemark/addRemarksViewNew?source=${source}" method="post" class="form-horizontal">
|
|
|
+
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label"><font color="red">*</font>描述:</label>
|
|
|
+ <textarea id='remarks' name='remarks' rows='5' cols='12' style="width: 700px" maxlength="200"></textarea>
|
|
|
+ </div>
|
|
|
+ <div>链接:${clubId}</div>
|
|
|
+ <div class="form-actions">
|
|
|
+ <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="确定并生成链接"/>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ $(function () {
|
|
|
+ var fileIds = '';
|
|
|
+ $('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
|
|
|
+ $('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
|
|
|
+ $('.upload-content .conList').find('.cancel-upload').hide();
|
|
|
+ var observeEle = document.getElementsByClassName('upload-content')[0];
|
|
|
+ var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
|
|
+ var MutationObserverConfig={
|
|
|
+ childList: true,
|
|
|
+ subtree: true,
|
|
|
+ characterData: true
|
|
|
+ };
|
|
|
+ var observer = new MutationObserver(function(mutations){
|
|
|
+ $.each(mutations, function(index,item) {
|
|
|
+ if (item.type === 'childList') {
|
|
|
+ // 在创建新的 element 时调用
|
|
|
+ var target = $(item.target),
|
|
|
+ thisWrapper = target.closest('.conList'),
|
|
|
+ nextEle = thisWrapper.next();
|
|
|
+ thisWrapper.find('li').css('z-index',99);
|
|
|
+ thisWrapper.find('.cancel-upload').show();
|
|
|
+ if(nextEle.hasClass('hide-pic')) {
|
|
|
+ nextEle.removeClass('hide-pic');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ observer.observe(observeEle,MutationObserverConfig);
|
|
|
+
|
|
|
+ $('body').on('click','.upload-content li',function() {
|
|
|
+ var index = $(this).closest('.conList').index() + 1,
|
|
|
+ str = 'remarkImage'+index+'FinderOpen';
|
|
|
+ eval(str+'()');
|
|
|
+ });
|
|
|
+ $('body').on('click', '.cancel-upload',function() {
|
|
|
+ var wrapper = $(this).closest('.conList');
|
|
|
+ wrapper.find('li').css('z-index','-1');
|
|
|
+ wrapper.find('input').val('');
|
|
|
+ $(this).hide();
|
|
|
+ if ($('.cancel-upload:visible').length < 9) {
|
|
|
+ wrapper.addClass("hide-pic");
|
|
|
+ }else{
|
|
|
+ wrapper.removeClass("hide-pic");
|
|
|
+ }
|
|
|
+ wrapper.parent().append(wrapper.clone());
|
|
|
+ wrapper.remove();
|
|
|
+ $(".conList").each(function(i,ele){
|
|
|
+ if($(ele).find("input.input-xlarge").val()){
|
|
|
+ $(ele).next().removeClass("hide-pic")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ $(window).on("load", function(){
|
|
|
+ setTimeout(function(){
|
|
|
+ $("#remarkImageBox").find("input.input-xlarge").each(function(i,ele){
|
|
|
+ if($(ele).val()){
|
|
|
+ $(ele).next().find("li").css("z-index","99");
|
|
|
+ $(ele).parents(".conList").find(".cancel-upload").show();
|
|
|
+ $(ele).parents(".conList").next().removeClass("hide-pic")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },500);
|
|
|
+ });
|
|
|
+ var controlsFiles = document.getElementById("controlsFiles");
|
|
|
+ controlsFiles.addEventListener("change", function () {
|
|
|
+ $('#uploadFileName').val(name.substring(0, name.indexOf('.')));
|
|
|
+ var files = $('#controlsFiles').prop('files');
|
|
|
+ var data = new FormData();
|
|
|
+ var url = "${ctx}/order/cmOrderRemark/upload";
|
|
|
+ data.append('file', files[0]);
|
|
|
+ data.append('orderId', ${orderID});
|
|
|
+ $.ajax({
|
|
|
+ url: url,
|
|
|
+ data: data,
|
|
|
+ type: "POST",
|
|
|
+ processData: false,
|
|
|
+ contentType: false,
|
|
|
+ dataType: "json",
|
|
|
+ success: function (res) {
|
|
|
+ var html="<p>"+res.orderRemarkFile.name+"<span class='del' onclick='dataDelete(this,"+res.orderRemarkFile.id+")'>删除</span></p>";
|
|
|
+ $("#file-list-display").append(html);
|
|
|
+ $("#controlsFiles").val("");
|
|
|
+ fileIds += (res.orderRemarkFile.id + ',');
|
|
|
+ $('#fileIds').val(fileIds);
|
|
|
+ },
|
|
|
+ error: function (error) {
|
|
|
+ alertx(error);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ //删除文件
|
|
|
+ function dataDelete(that, id) {
|
|
|
+ $(that).parent().remove();
|
|
|
+ $.ajax({
|
|
|
+ url: "${ctx}/order/cmOrderRemark/deleteFile",
|
|
|
+ data: {"fileId": id},
|
|
|
+ async: false,
|
|
|
+ type: "POST"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|