Toggle navigation
Toggle navigation
This project
Loading...
Sign in
liuloulou
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
dongjunjie
9 years ago
Commit
ab881b4c00aa3aaf13a53c13fa2003de06fefd2b
1 parent
e59d89da
按钮添加延时(供应商创建修改,品牌创建修改,店铺创建修改,店铺装修)
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
57 deletions
code/apps/brand/views/Edit.html
code/apps/shop/views/Decoration.html
code/apps/shop/views/Edit.html
code/apps/supplier/views/Edit.html
code/static/js.jquery/common/index.js
code/static/js.jquery/module/brand/Edit.js
code/static/js.jquery/module/supplier/Edit.js
code/apps/brand/views/Edit.html
View file @
ab881b4
...
...
@@ -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>
...
...
code/apps/shop/views/Decoration.html
View file @
ab881b4
...
...
@@ -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>
...
...
code/apps/shop/views/Edit.html
View file @
ab881b4
...
...
@@ -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>
...
...
code/apps/supplier/views/Edit.html
View file @
ab881b4
...
...
@@ -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>
...
...
code/static/js.jquery/common/index.js
View file @
ab881b4
...
...
@@ -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
,
''
));
...
...
code/static/js.jquery/module/brand/Edit.js
View file @
ab881b4
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
;
});
...
...
code/static/js.jquery/module/supplier/Edit.js
View file @
ab881b4
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment