记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
e1395b99
Commit
e1395b99
authored
Dec 07, 2021
by
qinshuangshuang@zhengzai.tv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建积分活动+优惠券选择
parent
46064c50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
27 deletions
+40
-27
form.html
...urces/templates/zhengzai/sweet/integralActivity/form.html
+40
-27
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/sweet/integralActivity/form.html
View file @
e1395b99
...
@@ -121,6 +121,15 @@
...
@@ -121,6 +121,15 @@
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"closeCouponShow()"
>
关闭窗口
</button>
<button
type=
"button"
class=
"btn btn-primary"
onclick=
"closeCouponShow()"
>
关闭窗口
</button>
<hr>
<hr>
<div
class=
"coupon-select"
style=
"display: none"
>
<div
class=
"coupon-select"
style=
"display: none"
>
<div
class=
"scope_application"
>
<span
class=
"labelName"
><i
class=
"required"
>
*
</i>
选择类别:
</span>
<div
class=
"radio-box"
>
<input
type=
"radio"
name=
"coupeAdd_type"
value=
"2"
checked=
"checked"
/>
商品
</div>
<div
class=
"radio-box"
>
<input
type=
"radio"
name=
"coupeAdd_type"
value=
"3"
/>
优先购买
</div>
</div>
<!--选择优惠券-->
<!--选择优惠券-->
<div
class=
"scope_application"
id=
"scope_application"
>
<div
class=
"scope_application"
id=
"scope_application"
>
<span
class=
"labelName"
><i
class=
"required"
>
*
</i>
选择优惠券:
</span>
<span
class=
"labelName"
><i
class=
"required"
>
*
</i>
选择优惠券:
</span>
...
@@ -152,13 +161,13 @@
...
@@ -152,13 +161,13 @@
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
platformUrl
=
`[[
${
platformUrl
}
]]`
let
platformUrl
=
`[[
${
platformUrl
}
]]`
var
prefix
=
ctx
+
"sweet/sweetIntegralActivity"
;
let
prefix
=
ctx
+
"sweet/sweetIntegralActivity"
;
var
candyfix
=
ctx
+
"candy/coupon"
;
let
candyfix
=
ctx
+
"candy/coupon"
;
let
showIndex
=
null
;
let
showIndex
=
null
;
// 初始化数据, 可以由后台传过来
// 初始化数据, 可以由后台传过来
var
data
=
[];
// 表格内数据集合
let
data
=
[];
// 表格内数据集合
let
activityName
=
''
;
// 活动名称
let
activityName
=
''
;
// 活动名称
let
activityType
=
''
;
// 活动类型
let
activityType
=
''
;
// 活动类型
let
timeType
=
'1'
;
// 活动时间类型
let
timeType
=
'1'
;
// 活动时间类型
...
@@ -171,7 +180,7 @@
...
@@ -171,7 +180,7 @@
let
online
=
'1'
;
// 是否上线
let
online
=
'1'
;
// 是否上线
let
itemId
=
''
;
let
itemId
=
''
;
let
activitySize
=
false
;
let
activitySize
=
false
;
var
options
=
{
let
options
=
{
id
:
"bootstrap-table"
,
id
:
"bootstrap-table"
,
data
:
data
,
data
:
data
,
pagination
:
false
,
pagination
:
false
,
...
@@ -261,10 +270,11 @@
...
@@ -261,10 +270,11 @@
title
:
'奖励积分数量'
,
title
:
'奖励积分数量'
,
formatter
:
function
(
value
,
row
,
index
)
{
formatter
:
function
(
value
,
row
,
index
)
{
let
str
=
''
;
let
str
=
''
;
if
(
data
[
index
].
prizeType
Num
&&
(
data
[
index
].
prizeType
===
1
)
)
{
if
(
data
[
index
].
prizeType
===
1
)
{
str
=
`<input id='prizeTypeNum
${
index
}
' class='form-control' type='text' name='' value='
${
data
[
index
].
prizeTypeNum
}
'>`
str
=
`<input id='prizeTypeNum
${
index
}
' class='form-control' type='text' name='' value='
${
data
[
index
].
prizeTypeNum
}
'>`
}
else
{
}
else
{
str
=
`<input id='prizeTypeNum
${
index
}
' class='form-control' type='text' name='' value=''>`
str
=
''
;
// str = `
<
input
id
=
'prizeTypeNum${index}'
class
=
'form-control'
type
=
'text'
name
=
''
value
=
''
>
`
}
}
var html = $.common.sprintf(str, index, value);
var html = $.common.sprintf(str, index, value);
return html;
return html;
...
@@ -353,7 +363,7 @@
...
@@ -353,7 +363,7 @@
title: '操作',
title: '操作',
formatter: function(value, row, index) {
formatter: function(value, row, index) {
let str = '';
let str = '';
if (data[index].prizeT
itle
) {
if (data[index].prizeT
ype === 2
) {
str = `
<
button
type
=
"button"
class
=
"btn btn-primary"
onclick
=
"showList(` + index + `)"
>
查看列表
<
/button>
`
str = `
<
button
type
=
"button"
class
=
"btn btn-primary"
onclick
=
"showList(` + index + `)"
>
查看列表
<
/button>
`
}
}
...
@@ -363,12 +373,12 @@
...
@@ -363,12 +373,12 @@
}
}
]
]
};
};
var
nowList
=
[];
// 当前编辑的奖品详情列表
let
nowList
=
[];
// 当前编辑的奖品详情列表
var
nowShowData
=
{};
// 当前编辑的奖品信息
let
nowShowData
=
{};
// 当前编辑的奖品信息
let
searchVal
=
''
;
// 优惠券输入框内数据
let
searchVal
=
''
;
// 优惠券输入框内数据
let
searchData
=
[];
// 优惠券搜索总数据
let
searchData
=
[];
// 优惠券搜索总数据
var
nowCouponSelect
=
{};
// 当前选择的优惠券
let
nowCouponSelect
=
{};
// 当前选择的优惠券
var
detailsOptions
=
{
let
detailsOptions
=
{
id
:
"details-table"
,
id
:
"details-table"
,
data
:
nowList
,
data
:
nowList
,
pagination
:
false
,
pagination
:
false
,
...
@@ -474,21 +484,19 @@
...
@@ -474,21 +484,19 @@
prizeImgInit
:
""
,
prizeImgInit
:
""
,
prizeImgSelect
:
""
,
prizeImgSelect
:
""
,
winPrizeNum
:
""
,
winPrizeNum
:
""
,
prizeType
:
""
,
prizeType
:
1
,
prizeTypeNum
:
""
,
prizeTypeNum
:
""
,
winningProbability
:
""
,
winningProbability
:
""
,
prizeDescribe
:
""
,
prizeDescribe
:
""
,
residue
:
""
,
residue
:
""
,
prizeNum
:
""
prizeNum
:
""
};
};
for
(
var
i
=
0
;
i
<
12
;
i
++
)
{
for
(
var
i
=
0
;
i
<
20
;
i
++
)
{
data
.
push
(
obj
)
data
.
push
(
obj
)
}
}
$
.
table
.
init
(
options
);
$
.
table
.
init
(
options
);
}
}
});
});
layui
.
use
(
'laydate'
,
function
(){
layui
.
use
(
'laydate'
,
function
(){
var
laydate
=
layui
.
laydate
;
var
laydate
=
layui
.
laydate
;
//执行一个laydate实例
//执行一个laydate实例
...
@@ -645,16 +653,16 @@
...
@@ -645,16 +653,16 @@
temp
.
winningProbability
=
$
(
"#winningProbability"
+
index
).
val
();
temp
.
winningProbability
=
$
(
"#winningProbability"
+
index
).
val
();
temp
.
prizeDescribe
=
$
(
"#prizeDescribe"
+
index
).
val
();
temp
.
prizeDescribe
=
$
(
"#prizeDescribe"
+
index
).
val
();
}
}
// TODO
//
//
TODO
temp
.
prizeId
=
data
[
index
].
prizeId
?
data
[
index
].
prizeId
:
''
;
//
temp.prizeId = data[index].prizeId ? data[index].prizeId : '';
temp
.
prizeTitle
=
'名称'
;
//
temp.prizeTitle = '名称';
temp
.
prizeImgInit
=
"https://img.zhengzai.tv/other/2021/12/03/9b70f3c310f0452bb4544f9d7d5f482e.png"
;
//
temp.prizeImgInit = "https://img.zhengzai.tv/other/2021/12/03/9b70f3c310f0452bb4544f9d7d5f482e.png";
temp
.
prizeImgSelect
=
"https://img.zhengzai.tv/other/2021/12/03/9b70f3c310f0452bb4544f9d7d5f482e.png"
;
//
temp.prizeImgSelect = "https://img.zhengzai.tv/other/2021/12/03/9b70f3c310f0452bb4544f9d7d5f482e.png";
temp
.
prizeType
=
$
(
"#prizeType"
+
index
).
val
();
//
temp.prizeType = $("#prizeType"+index).val();
temp
.
winningProbability
=
1
;
//
temp.winningProbability = 1;
temp
.
prizeNum
=
1
;
//
temp.prizeNum = 1;
temp
.
prizeTypeNum
=
temp
.
prizeType
==
'1'
?
1
:
0
;
//
temp.prizeTypeNum = temp.prizeType == '1' ? 1: 0;
temp
.
prizeDescribe
=
"描述"
;
//
temp.prizeDescribe = "描述";
prizeListArr
.
push
(
temp
);
prizeListArr
.
push
(
temp
);
// return {...item};
// return {...item};
...
@@ -728,6 +736,10 @@
...
@@ -728,6 +736,10 @@
function
closeCouponShow
()
{
function
closeCouponShow
()
{
$
(
"#detailsFormList"
).
hide
();
$
(
"#detailsFormList"
).
hide
();
}
}
// 类别
function
changeRadioType
(
val
)
{
console
.
log
(
'changeRadioType'
,
val
);
}
// 添加优惠券
// 添加优惠券
function
addCouponFun
()
{
function
addCouponFun
()
{
let
postData
=
{
let
postData
=
{
...
@@ -771,11 +783,12 @@
...
@@ -771,11 +783,12 @@
function
getMallList
()
{
function
getMallList
()
{
let
data
=
{
let
data
=
{
keyword
:
searchVal
,
keyword
:
searchVal
,
busiType
:
0
,
busiType
:
parseInt
(
$
(
'input[type=radio][name=coupeAdd_type]:checked'
).
val
())
,
pageSize
:
20
,
pageSize
:
20
,
pageNum
:
1
,
pageNum
:
1
,
bindType
:
2
bindType
:
2
}
}
console
.
log
(
data
);
let
str
=
''
;
let
str
=
''
;
promiseMethods
(
candyfix
+
"/list"
,
'post'
,
data
,
'application/x-www-form-urlencoded'
).
then
(
res
=>
{
promiseMethods
(
candyfix
+
"/list"
,
'post'
,
data
,
'application/x-www-form-urlencoded'
).
then
(
res
=>
{
if
(
res
.
rows
.
length
>
0
)
{
if
(
res
.
rows
.
length
>
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment