|
@@ -9,8 +9,18 @@
|
|
//$("#name").focus();
|
|
//$("#name").focus();
|
|
$("#inputForm").validate({
|
|
$("#inputForm").validate({
|
|
submitHandler: function(form){
|
|
submitHandler: function(form){
|
|
- loading('正在提交,请稍等...');
|
|
|
|
- form.submit();
|
|
|
|
|
|
+ debugger
|
|
|
|
+ var orderArchiveId = $("#id").val();
|
|
|
|
+ var shopOrderId = $("#shopOrderId").val();
|
|
|
|
+ $.post("${ctx}/archive/cmOrderArchive/checkShopOrderId",{"id":orderArchiveId,"shopOrderId":shopOrderId},function (result) {
|
|
|
|
+ if (result.code != 0) {
|
|
|
|
+ var errorMsg = result.msg;
|
|
|
|
+ jBox.tip(errorMsg, "error");
|
|
|
|
+ } else {
|
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
|
+ form.submit();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
errorContainer: "#messageBox",
|
|
errorContainer: "#messageBox",
|
|
errorPlacement: function(error, element) {
|
|
errorPlacement: function(error, element) {
|
|
@@ -167,6 +177,10 @@
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .Main-content{
|
|
|
|
+ height: 100px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
@@ -174,7 +188,6 @@
|
|
<li><a href="${ctx}/archive/cmOrderArchive/">订单资料列表</a></li>
|
|
<li><a href="${ctx}/archive/cmOrderArchive/">订单资料列表</a></li>
|
|
<li class="active"><a href="${ctx}/archive/cmOrderArchive/form?id=${cmOrderArchive.id}">订单资料${not empty cmOrderArchive.id?'编辑':'添加'}</a></li>
|
|
<li class="active"><a href="${ctx}/archive/cmOrderArchive/form?id=${cmOrderArchive.id}">订单资料${not empty cmOrderArchive.id?'编辑':'添加'}</a></li>
|
|
</ul><br/>
|
|
</ul><br/>
|
|
- <input type="hidden" id="errorMsg" value="${errorMsg}"/>
|
|
|
|
<form:form id="inputForm" modelAttribute="cmOrderArchive" action="${ctx}/archive/cmOrderArchive/save" method="post" class="form-horizontal">
|
|
<form:form id="inputForm" modelAttribute="cmOrderArchive" action="${ctx}/archive/cmOrderArchive/save" method="post" class="form-horizontal">
|
|
<form:hidden path="id"/>
|
|
<form:hidden path="id"/>
|
|
<form:hidden path="fileIds" id="fileIds"/>
|
|
<form:hidden path="fileIds" id="fileIds"/>
|
|
@@ -204,7 +217,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
- <label class="control-label">商品标签:</label>
|
|
|
|
|
|
+ <label class="control-label" style="margin-top: 14px">商品标签:</label>
|
|
<div class="controls Main-content">
|
|
<div class="controls Main-content">
|
|
<div class="tags-operate">
|
|
<div class="tags-operate">
|
|
<input type="text" class="reg-input tag-input" id="tagInput" placeholder="输入商品标签,支持添加多个"
|
|
<input type="text" class="reg-input tag-input" id="tagInput" placeholder="输入商品标签,支持添加多个"
|
|
@@ -238,7 +251,7 @@
|
|
<input type="file" name="file" id="archiveFile" accept=".pdf,.doc,.docx,.png,.jpg">选择文件
|
|
<input type="file" name="file" id="archiveFile" accept=".pdf,.doc,.docx,.png,.jpg">选择文件
|
|
</div>
|
|
</div>
|
|
<div class="add-submit">
|
|
<div class="add-submit">
|
|
- <input id="addSubmit" type="button" value="上传"/>上传 +
|
|
|
|
|
|
+ <input id="addSubmit" type="button" value="上传"/>上传
|
|
</div>
|
|
</div>
|
|
<div class="upload-loading">
|
|
<div class="upload-loading">
|
|
<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
|
|
<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
|
|
@@ -265,10 +278,7 @@
|
|
<script>
|
|
<script>
|
|
// 初始化主营内容数据
|
|
// 初始化主营内容数据
|
|
$(function () {
|
|
$(function () {
|
|
- var errorMsg = $("#errorMsg").val();
|
|
|
|
- if (errorMsg != '' && errorMsg != 'undefined') {
|
|
|
|
- jBox.tip(errorMsg, "error");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
var html = '';
|
|
var html = '';
|
|
$('#tagArea').html(html);
|
|
$('#tagArea').html(html);
|
|
$('.Main-content').show();
|
|
$('.Main-content').show();
|
|
@@ -312,13 +322,13 @@
|
|
|
|
|
|
//点击上传按钮后上传文件
|
|
//点击上传按钮后上传文件
|
|
$('#addSubmit').click(function () {
|
|
$('#addSubmit').click(function () {
|
|
- debugger
|
|
|
|
var files = $('#archiveFile').prop('files');
|
|
var files = $('#archiveFile').prop('files');
|
|
var fileName = $('#uploadFileName').val();
|
|
var fileName = $('#uploadFileName').val();
|
|
if (files === '' || files.length == 0 || fileName == '') {
|
|
if (files === '' || files.length == 0 || fileName == '') {
|
|
alertx('请选择上传文件');
|
|
alertx('请选择上传文件');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ $("#uploadFileName").val("");
|
|
var data = new FormData();
|
|
var data = new FormData();
|
|
var orderArchiveId = $("#id").val();
|
|
var orderArchiveId = $("#id").val();
|
|
var fileIds = $("#fileIds").val();
|
|
var fileIds = $("#fileIds").val();
|
|
@@ -338,10 +348,10 @@
|
|
if (res.success) {
|
|
if (res.success) {
|
|
files.value = '';
|
|
files.value = '';
|
|
renderFileList(res.archiveFile);
|
|
renderFileList(res.archiveFile);
|
|
- $("#uploadFileName").val("");
|
|
|
|
$('.upload-loading').hide();
|
|
$('.upload-loading').hide();
|
|
} else {
|
|
} else {
|
|
$.jBox.tip(res.msg, 'error');
|
|
$.jBox.tip(res.msg, 'error');
|
|
|
|
+ $("#uploadFileName").val(fileName);
|
|
$('.upload-loading').hide();
|
|
$('.upload-loading').hide();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -363,7 +373,6 @@
|
|
});
|
|
});
|
|
var fileListDisplay = document.getElementById('file-list-display');
|
|
var fileListDisplay = document.getElementById('file-list-display');
|
|
renderFileList = function (data) {
|
|
renderFileList = function (data) {
|
|
- debugger
|
|
|
|
fileIds += data.id + ',';
|
|
fileIds += data.id + ',';
|
|
console.log(fileIds);
|
|
console.log(fileIds);
|
|
$('#fileIds').val(fileIds);
|
|
$('#fileIds').val(fileIds);
|