Authored by 陶雨

Merge branch 'yohobuy_portak_dev_v4.8_20160620' of http://git.yoho.cn/fe/yohobuy…

…-portal-fe2 into yohobuy_portak_dev_v4.8_20160620
... ... @@ -237,7 +237,7 @@
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
<button id="save_brand" type="submit" data-loading-text="保存中..." class="btn btn-primary">保存</button>
<button id="save_brand" type="submit" data-loading-text="保存中..." class="btn delay-btn btn-primary">保存</button>
</div>
</div>
</div>
... ...
... ... @@ -34,13 +34,13 @@
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
</div>
<div class="moduleSubmite" style="display: none; text-align: right; margin-top: -10px">
<input id="saveModule" type="button" class="btn btn-success" value="暂存">
<input id="submitModule" type="button" class="btn btn-primary" value="提交审核">
<input id="saveModule" type="button" class="btn btn-success delay-btn" value="暂存">
<input id="submitModule" type="button" class="btn btn-primary delay-btn" value="提交审核">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
</div>
<div class="moduleCheck" style="display: none; text-align: right; margin-top: -10px">
<input id="checkOk" type="button" class="btn btn-primary" value="审核通过">
<input id="checkNo" type="button" class="btn btn-danger" value="驳回">
<input id="checkOk" type="button" class="btn btn-primary delay-btn" value="审核通过">
<input id="checkNo" type="button" class="btn btn-danger delay-btn" value="驳回">
<input type="button" class="btn btn-default " value="返回" onclick="history.go(-1)">
</div>
</div>
... ...
... ... @@ -127,8 +127,8 @@
</div>
<div style="text-align: center">
<button type="button" data-oncheck='1' class="check btn btn-success">提交审核</button>
<button type="button" data-oncheck='2' class="check btn btn-info btn-cun">暂存</button>
<button type="button" data-oncheck='1' class="check delay-btn btn btn-success">提交审核</button>
<button type="button" data-oncheck='2' class="check delay-btn btn btn-info btn-cun">暂存</button>
<button onclick="history.go(-1);" type="button" class="btn btn-danger">取消</button>
</div>
</div>
... ...
... ... @@ -225,15 +225,15 @@
<a href="javascript:;" class="btn btn-default"
onclick="javascript:history.go(-1);">取消</a>
<%if add%>
<button type="submit" class="btn btn-info" data-loading-text="暂存中..." id="btnTemporary">暂存</button>
<button type="submit" class="btn delay-btn btn-info" data-loading-text="暂存中..." id="btnTemporary">暂存</button>
<%/if%>
<%if update%>
<button type="submit" class="btn btn-success mr5" data-loading-text="提交审核中..." id="btnReview">提交审核</button>
<button type="submit" class="btn delay-btn btn-success mr5" data-loading-text="提交审核中..." id="btnReview">提交审核</button>
<%/if%>
<%if updatecheck%>
<button type="submit" class="btn btn-success mr5" data-loading-text="提交审核中..." id="updatecheck">提交审核</button>
<button type="submit" class="btn delay-btn btn-success mr5" data-loading-text="提交审核中..." id="updatecheck">提交审核</button>
<%/if%>
</div>
</div>
... ...
... ... @@ -103,15 +103,13 @@ $('.dropdown-menu').on('mouseenter', function() {
$(this).hide();
});
// $(document).on("click",".btn",function(){
// var $this=$(this);
// if(!$this.is(":file")){
// $this.prop("disabled",true);
// setTimeout(function(){
// $this.prop("disabled",false)
// },2000);
// }
// });
$(document).on("click",".delay-btn",function(){
var $this=$(this);
$this.prop("disabled",true);
setTimeout(function(){
$this.prop("disabled",false)
},2000);
});
$(document).on("keyup change","input[type='number']",function(){
$(this).val($(this).val().replace(/[^0-9]/g, ''));
... ...
var $=require('jquery');
var edit=require('../../common/edit');
var e=new edit("#basicForm",{
bucket:"brandLogo"
});
//brandTonality
e.on("validate",function(){
var num=$.trim($("#brandTonality").val());
if(num){
if(+num>100||+num<1){
return "调性指数(范围:1-100)";
}
var $ = require('jquery');
var edit = require('../../common/edit');
var e = new edit("#basicForm", {
bucket: "brandLogo"
});
//brandTonality
e.on("validate", function () {
var num = $.trim($("#brandTonality").val());
if (num) {
if (+num > 100 || +num < 1) {
return "调性指数(范围:1-100)";
}
return true;
});
e.init();
$("#save_brand").click(function(){
e.submit($("#basicForm").attr("action"),function(option){
option.success=function(res){
if(res.code=="200"){
e.$tip("提交成功", function() {
location.href="/erpproduct/brands/index"
}, 'growl-success');
}else{
e.$tip(res.message);
}
return false;
},
option.error=function(res){
}
return true;
});
e.init();
$(document).on('click','#save_brand',function () {
e.submit($("#basicForm").attr("action"), function (option) {
option.success = function (res) {
if (res.code == "200") {
e.$tip("提交成功", function () {
location.href = "/erpproduct/brands/index"
}, 'growl-success');
} else {
e.$tip(res.message);
}
return false;
},
option.error = function (res) {
e.$tip(res.message);
}
console.log(option.data);
});
return false;
})
console.log(option.data);
});
return false;
});
... ...
... ... @@ -44,18 +44,19 @@ var submit = function (callback, config) {
}
callback && callback(option.data);
});
}
};
//添加暂存,提交审核
$("#btnTemporary").click(function () {
$(document).on('click','#btnTemporary',function () {
submit(function (data) {
data.operations = 1;
data.status = 100;
}, {msg: "暂存成功"});
return false;
});
$("#btnReview").click(function () {
//到审核表
//到审核表
$(document).on('click','#btnReview',function () {
submit(function (data) {
data.operations ? data.operations : data.operations = 1;
if (+data.status == 300) {
... ... @@ -65,8 +66,9 @@ $("#btnReview").click(function () {
}, {msg: "提交成功"});
return false;
});
//供应商列表
$("#updatecheck").click(function () {
$(document).on('click','#updatecheck',function () {
submit(function (data) {
data.operations = 2;
data.status = 200;
... ...