Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
e9f3383b
提交
e9f3383b
authored
1月 19, 2021
作者:
陆
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
复制广告投放
上级
95d82be3
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
72 行增加
和
3 行删除
+72
-3
advertisement.html
...admin/src/main/webapp/WEB-INF/page/sys/advertisement.html
+1
-0
advertisement.js
platform-admin/src/main/webapp/js/sys/advertisement.js
+71
-3
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/advertisement.html
浏览文件 @
e9f3383b
...
...
@@ -118,6 +118,7 @@
#if($shiro.hasPermission("advertisement:delete"))
<i-button
type=
"error"
@
click=
"del"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
<i-button
type=
"info"
@
click=
"copy"
><i
class=
"fa fa-plus"
></i>
复制
</i-button>
</div>
</Row>
<table
id=
"jqGrid"
></table>
...
...
platform-admin/src/main/webapp/js/sys/advertisement.js
浏览文件 @
e9f3383b
...
...
@@ -130,9 +130,11 @@ let vm = new Vue({
},
q
:
{
name
:
''
}
},
iscopy
:
0
,
//是否为复制
},
methods
:
{
//新增广告
add
:
function
()
{
vm
.
tempId
=
this
.
guid
();
vm
.
showList
=
false
;
...
...
@@ -297,7 +299,7 @@ let vm = new Vue({
return
v
.
toString
(
32
);
});
},
//修改广告
update
:
function
(
event
)
{
$
(
"#searchjqGrid"
).
jqGrid
(
"clearGridData"
);
$
(
"#adItemjqGrid"
).
jqGrid
(
"clearGridData"
);
...
...
@@ -330,6 +332,53 @@ let vm = new Vue({
label
:
'操作'
,
index
:
'operate'
,
width
:
160
,
formatter
:
function
(
value
,
grid
,
rows
)
{
return
'<span class="label label-info pointer" onclick="vm.delItem(
\'
'
+
rows
.
itemId
+
'
\'
)">移除</span> '
+
'<span class="label label-info pointer" onclick="vm.sortItem(
\'
'
+
rows
.
itemId
+
'
\'
)">排序</span> '
}
}
// beforeSelectRow: beforeSelectRow,
],
multiboxonly
:
true
});
});
vm
.
btn_Search
(
id
);
vm
.
getInfo
(
id
);
},
//复制广告
copy
:
function
(
event
)
{
$
(
"#searchjqGrid"
).
jqGrid
(
"clearGridData"
);
$
(
"#adItemjqGrid"
).
jqGrid
(
"clearGridData"
);
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
tempId
=
this
.
guid
();
vm
.
iscopy
=
1
vm
.
showList
=
false
;
vm
.
title
=
"复制"
;
$
(
function
()
{
$
(
"#adItemjqGrid"
).
Grid
({
url
:
'../advertisement/getAdvertisementItem?adId='
+
id
,
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
key
:
true
,
index
:
'item_id'
,
hidden
:
true
},
{
label
:
'序号'
,
name
:
'itemSort'
,
index
:
'itemSort'
,
width
:
100
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
100
,
formatter
:
imageFormat
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
160
},
{
label
:
'商品名称'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
160
},
/* {label: '商品标题', name: 'itemBrief', index: 'item_brief', width: 120},*/
/*{label: '商品链接', name: 'itemUrl', index: 'item_url', width: 80,formatter:linkFormat},*/
{
label
:
'商品原价'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
100
},
{
label
:
'商品现价'
,
name
:
'discountPrice'
,
index
:
'discount_price'
,
width
:
100
},
/*{label: '所属平台', name: 'platformCode', index: 'platform_code', width: 80},
{label: '平台名', name: 'platformName', index: 'platform_name', width: 80},*/
{
label
:
'供应商'
,
name
:
'supplier'
,
index
:
'supplier'
,
width
:
120
},
{
label
:
'商品一级分类'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
120
},
{
label
:
'商品二级分类'
,
name
:
'title'
,
index
:
'title'
,
width
:
120
},
{
label
:
'商品品名'
,
name
:
'dname'
,
index
:
'itemDescritionId'
,
width
:
120
},
{
label
:
'操作'
,
index
:
'operate'
,
width
:
160
,
formatter
:
function
(
value
,
grid
,
rows
)
{
return
'<span class="label label-info pointer" onclick="vm.delItem(
\'
'
+
rows
.
itemId
+
'
\'
)">移除</span> '
+
'<span class="label label-info pointer" onclick="vm.sortItem(
\'
'
+
rows
.
itemId
+
'
\'
)">排序</span> '
}
...
...
@@ -384,18 +433,33 @@ let vm = new Vue({
alert
(
"结束时间不能比开始时间早"
)
return
;
}
let
url
=
vm
.
advertisement
.
id
==
null
?
"../advertisement/save"
:
"../advertisement/update"
;
// let url = vm.advertisement.id == null ? "../advertisement/save" : "../advertisement/update";
var
url
;
if
(
vm
.
iscopy
==
1
){
url
=
"../advertisement/save"
}
else
if
(
vm
.
advertisement
.
id
==
null
&&
vm
.
iscopy
==
0
){
url
=
"../advertisement/save"
}
else
if
(
vm
.
advertisement
.
id
!=
null
&&
vm
.
iscopy
==
0
){
url
=
"../advertisement/update"
}
let
ids
=
$
(
"#searchjqGrid"
).
getGridParam
(
"selarrrow"
);
vm
.
advertisement
.
itemIds
=
ids
;
if
(
vm
.
advertisement
.
id
==
null
||
vm
.
advertisement
.
id
==
''
||
vm
.
advertisement
.
id
==
'undefined'
)
{
vm
.
advertisement
.
id
=
vm
.
tempId
;
}
if
(
vm
.
iscopy
==
1
){
vm
.
advertisement
.
id
=
vm
.
tempId
}
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
advertisement
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
vm
.
iscopy
==
0
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
...
...
@@ -429,6 +493,10 @@ let vm = new Vue({
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
advertisement
=
r
.
advertisement
;
if
(
vm
.
iscopy
==
1
){
vm
.
advertisement
.
adName
=
r
.
advertisement
.
adName
+
'(1)'
vm
.
advertisement
.
adLink
=
r
.
advertisement
.
adLink
+
'(1)'
}
}
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论