Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe2
·
Commits
Go to a project
GitLab
Go to group
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
Plain Diff
Browse Files
Authored by
wangwei
7 years ago
Commit
d11ff149f9b303ed50a120343fd93f3e8237bd44
2 parents
ed25f5d1
0a9035b8
Merge branch 'dev_link' into test6.5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
91 additions
and
14 deletions
code/apps/marketing/interfaces/CouponList.js
code/apps/marketing/views/CouponList/AddOrUpdate.html
code/apps/marketing/views/CouponList/Index.html
code/apps/operations/views/generateLinks/Batch.html
code/apps/operations/views/generateLinks/Index.html
code/index.js
code/static/js.jquery/module/marketing/CouponList/AddOrUpdate.js
code/static/js.jquery/module/marketing/partials/couponList-bean.js
code/static/js.jquery/module/operations/generateLinks/Index.js
code/apps/marketing/interfaces/CouponList.js
View file @
d11ff14
...
...
@@ -59,7 +59,9 @@ module.exports = {
productLimit
:{
type
:
String
},
isNew
:
{
type
:
Number
},
isUseLimitRule
:{
type
:
String
},
prdPoolLimit
:
{
type
:
String
}
prdPoolLimit
:
{
type
:
String
},
cusPublicCouponName
:{
type
:
String
},
publicCouponType
:{
type
:
Number
}
}
},
reject
:
{
...
...
code/apps/marketing/views/CouponList/AddOrUpdate.html
View file @
d11ff14
...
...
@@ -61,22 +61,38 @@
<
input
type
=
"hidden"
value
=
"[[isNew]]"
id
=
"isNew"
for
=
"checkbox"
placeholder
=
"前台展示"
>
[[
/if]
]
[[
if
couponType
==
'3'
]]
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
<
label
class
=
"checkbox-inline"
><
input
type
=
"checkbox"
value
=
"1"
name
=
"isUseLimitRule"
class
=
"custom-1"
[[
if
isUseLimitRule
==
'N'
]]
checked
[[
/if]]> 市场通用</
label
>
[[
/if]
]
<
/div
>
<
/div
>
<
/div
>
[[
if
couponType
==
3
]]
<
div
class
=
"row"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
生成方式
<
span
class
=
"red"
>*<
/span></
label
>
<
div
class
=
"col-sm-8"
class
=
"radio-inline"
>
<
input
type
=
"radio"
name
=
"publicCouponType"
value
=
"0"
[[
if
publicCouponType
==
0
]]
checked
[[
/if]]>系统生成</
label
>
<
input
type
=
"radio"
name
=
"publicCouponType"
value
=
"1"
[[
if
publicCouponType
==
1
]]
checked
[[
/if]]>手动配置</
label
>
<
/div
>
<
/div
>
<
/div
>
[[
if
publicCouponType
==
1
]]
<
div
class
=
"row"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
><
/label
>
<
label
class
=
"col-sm-2 control-label"
>
码值
<
span
class
=
"red"
>*<
/span>
</
label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"checkbox"
value
=
"1"
name
=
"isUseLimitRule"
class
=
"custom-1"
[[
if
isUseLimitRule
==
'N'
]]
checked
[[
/if]]> 市场通
用
<
input
type
=
"text"
name
=
"cusPublicCouponName"
placeholder
=
'以"#"开头,支持数字,字母(不区分大小写),汉字,20字符内'
class
=
"form-control observe"
data
-
field
=
"cusPublicCouponName"
required
maxlength
=
"20"
value
=
"[[cusPublicCouponName]]"
>
<
/div
>
<
/div
>
<
/div
>
[[
/if]
]
[[
/if]
]
<
/div
>
[[
/if]
]
<
div
class
=
"panel-heading"
>
<
h4
class
=
"panel-title"
>
基本信息
<
/h4
>
<
/div
>
...
...
@@ -95,7 +111,7 @@
<
label
class
=
"col-sm-2 control-label"
>
数量
<
i
class
=
"red"
>*<
/i></
label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"text"
placeholder
=
"数量"
prompt
=
"数量"
class
=
"form-control observe number"
<
input
type
=
"text"
name
=
"couponNum"
placeholder
=
"数量"
prompt
=
"数量"
class
=
"form-control observe number"
data
-
field
=
"couponNum"
required
value
=
"[[couponNum]]"
>
<
/div
>
...
...
code/apps/marketing/views/CouponList/Index.html
View file @
d11ff14
...
...
@@ -96,6 +96,18 @@
<
/div
>
<
/div
>
<
/div
>
[[
if
publicCouponType
==
'1'
]]
<
div
class
=
"panel-body"
>
<
div
class
=
"row"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-2 control-label"
>
码值
<
/label
>
<
div
class
=
"col-sm-8"
>
<
p
>
[[
cusPublicCouponName
]]
<
/p
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
[[
/if]
]
[[
/if]
]
<
div
class
=
"panel-heading"
>
<
h4
class
=
"panel-title"
>
基本信息
<
/h4
>
...
...
code/apps/operations/views/generateLinks/Batch.html
View file @
d11ff14
...
...
@@ -25,8 +25,8 @@
<td>
url类型
</td>
<td>
<label>
url类型
<span
style=
"color:red"
>
*
</span></label>
  
<label
class=
"radio-inline"
><input
type=
"radio"
name=
"urlType"
value=
"1"
checked
>
http
</label>
<label
class=
"radio-inline"
><input
type=
"radio"
name=
"urlType"
value=
"2"
>
https
</label>
<label
class=
"radio-inline"
><input
type=
"radio"
name=
"urlType"
value=
"1"
>
http
</label>
<label
class=
"radio-inline"
><input
type=
"radio"
name=
"urlType"
value=
"2"
checked
>
https
</label>
</td>
</tr>
</table>
...
...
code/apps/operations/views/generateLinks/Index.html
View file @
d11ff14
...
...
@@ -64,7 +64,7 @@
<div class="
form
-
group
">
<label>url类型<span style="
color
:
red
">*</span></label></label>  
<label class="
radio
-
inline
"><input type="
radio
" name="
urlType
" value="
1
">http</label>
<label class="
radio
-
inline
"><input type="
radio
" name="
urlType
" value="
2
">https</label>
<label class="
radio
-
inline
"><input type="
radio
" name="
urlType
" value="
2
"
checked
>https</label>
<input type="
hidden
" value="
[[
urlType
]]
" id="
urlType
" for="
radio
" required>
</div>
<div class="
form
-
group
">
...
...
code/index.js
View file @
d11ff14
...
...
@@ -49,7 +49,7 @@ var Iaccount = {
var
apiCofig
=
{
//root:__dirname,
EnvConst
:{
domain
:
"http://1
92.168.102.48
:8088/platform"
,
domain
:
"http://1
27.0.0.1
:8088/platform"
,
//domain:"http://127.0.0.1:8088/platform",
// domain:"http://172.16.6.200:8088/platform",
//domain:"http://192.168.102.202:8088/platform",
...
...
code/static/js.jquery/module/marketing/CouponList/AddOrUpdate.js
View file @
d11ff14
...
...
@@ -13,6 +13,7 @@ var endTimeObj;
var
customType
=
[];
var
shopPriceLimits
=
[];
var
isNew
;
var
publicCouponType
;
/**
* 监听输入值的变化
*/
...
...
@@ -172,7 +173,14 @@ var Bll = {
if
(
couponBean
.
isNew
){
isNew
=
couponBean
.
isNew
;
}
if
(
couponBean
.
couponType
==
'3'
){
$
(
"input[name='publicCouponType']"
).
attr
(
"disabled"
,
true
);
if
(
couponBean
.
publicCouponType
==
'1'
){
$
(
"input[name='cusPublicCouponName']"
).
attr
(
"disabled"
,
true
);
$
(
"input[name='couponNum']"
).
attr
(
"disabled"
,
true
);
$
(
"#filter-couponType"
).
attr
(
"disabled"
,
true
);
}
}
}
},
...
...
@@ -326,6 +334,21 @@ $(document).on("click", "input[name='customType']", function () {
}
couponBean
.
customType
=
customType
.
join
(
","
);
});
$
(
document
).
on
(
"click"
,
"input[name='publicCouponType']"
,
function
()
{
publicCouponType
=
$
(
this
).
val
();
console
.
log
(
"publicCouponType"
,
publicCouponType
);
if
(
publicCouponType
==
'1'
){
couponBean
.
couponNum
=
1
;
$
(
"input[name='couponNum']"
).
attr
(
"disabled"
,
true
);
}
couponBean
.
publicCouponType
=
publicCouponType
Bll
.
__render
(
couponBean
,
type
);;
if
(
publicCouponType
==
'1'
){
$
(
"input[name='couponNum']"
).
attr
(
"disabled"
,
true
);
}
});
/**
* 免邮券开关
*/
...
...
@@ -377,6 +400,27 @@ $(document).on("click", "#save_brand", function () {
return
false
;
}
}
if
(
couponBean
.
couponType
==
'3'
){
if
(
couponBean
.
publicCouponType
==
'0'
){
couponBean
.
cusPublicCouponName
=
''
;
}
if
(
couponBean
.
publicCouponType
==
'1'
){
var
cusPublicCouponName
=
couponBean
.
cusPublicCouponName
;
if
(
cusPublicCouponName
==
''
){
common
.
util
.
__tip
(
'码值不能为空!'
,
'warning'
);
return
false
;
}
//名称不能包含特殊字符
if
(
!
cusPublicCouponName
.
startsWith
(
"#"
)
||
/
[
~^$@%&!*
]
/gi
.
test
(
cusPublicCouponName
)){
common
.
util
.
__tip
(
'码值格式输入错误'
,
'warning'
);
return
false
;
}
if
(
cusPublicCouponName
.
length
>
20
){
common
.
util
.
__tip
(
'码值不可超出20个汉字'
,
'warning'
);
return
false
;
}
}
}
var
productLimit
=
$
(
"textarea[name=\"productLimit\"]"
).
val
();
if
(
productLimit
){
couponBean
.
productLimit
=
productLimit
;
...
...
code/static/js.jquery/module/marketing/partials/couponList-bean.js
View file @
d11ff14
...
...
@@ -27,7 +27,10 @@ var couponBean = {
shopIds
:
""
,
feeSharingType
:
"0"
,
feeSharingRatio
:
""
,
isUseLimitRule
:
""
isUseLimitRule
:
""
,
cusPublicCouponName
:
""
,
publicCouponType
:
""
};
module
.
exports
=
couponBean
;
\ No newline at end of file
...
...
code/static/js.jquery/module/operations/generateLinks/Index.js
View file @
d11ff14
...
...
@@ -9,12 +9,12 @@ common = require('../../../common/common');
var
module
=
{
channelId
:
2
,
linkType
:
"app"
,
urlType
:
1
urlType
:
2
},
singleModule
=
{
action
:
"go.brand"
,
linkType
:
"app"
,
urlType
:
1
urlType
:
2
};
var
edit
=
new
common
.
edit2
(
"#generate-content"
);
var
role
=
$
(
"#wrap-content"
).
attr
(
"role"
),
...
...
Please
register
or
login
to post a comment