Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
171082cb
提交
171082cb
authored
10月 30, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品管理优化
上级
768c9291
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
60 行增加
和
44 行删除
+60
-44
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+24
-11
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+36
-33
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
171082cb
...
...
@@ -4,7 +4,7 @@
<title>
站点商品
</title>
#parse("sys/header.html")
<style>
#ImgBox
{
#ImgBox
{
display
:
none
;
position
:
fixed
;
width
:
400px
;
...
...
@@ -13,9 +13,11 @@
left
:
300px
;
/*background: red;*/
}
#ImgBox
img
{
#ImgBox
img
{
width
:
100%
;
}
ul
>
li
{
list-style
:
none
;
}
...
...
@@ -108,6 +110,16 @@
padding
:
2px
8px
;
}
.ui-jqgrid
.ui-jqgrid-btable
tbody
tr
.jqgrow
td
{
overflow
:
hidden
;
white-space
:
pre
;
padding-right
:
2px
;
height
:
100px
;
}
#itemImg
:hover
{
transform
:
scale
(
3
);
}
.container
.prev-li
>
div
{
margin-left
:
5px
;
display
:
flex
;
...
...
@@ -528,13 +540,13 @@
<i-option
value=
"2"
>
已下架
</i-option>
</i-select>
</span>
<!-- <span>-->
<!-- 商品序号互换:-->
<!-- <i-input v-model="q.code" @on-enter="query" placeholder="商品编号" style="width:80px">-->
<!-- </i-input>-->
<!-- <i-input v-model="q.code" @on-enter="query" placeholder="商品编号" style="width:80px">-->
<!-- </i-input>-->
<!-- </span>-->
<!-- <span>-->
<!-- 商品序号互换:-->
<!-- <i-input v-model="q.code" @on-enter="query" placeholder="商品编号" style="width:80px">-->
<!-- </i-input>-->
<!-- <i-input v-model="q.code" @on-enter="query" placeholder="商品编号" style="width:80px">-->
<!-- </i-input>-->
<!-- </span>-->
...
...
@@ -587,7 +599,8 @@
#if($shiro.hasPermission("tbcfstationitem:delete"))
<i-button
type=
"error"
@
click=
"changeItemStatus(0)"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
<i-button
type=
"warning"
@
click=
"changeItemsTop"
><i
class=
"fa fa-arrow-down"
></i>
取消置顶
</i-button>
<i-button
type=
"warning"
@
click=
"changeItemsTop"
><i
class=
"fa fa-arrow-down"
></i>
取消置顶
</i-button>
<i-button
type=
"success"
@
click=
"changeItemsunTop"
><i
class=
"fa fa-arrow-up"
></i>
批量置顶
</i-button>
...
...
@@ -615,7 +628,7 @@
</div>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"tbCfStationItem"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"序号"
prop=
"sort"
style=
"width: 800px"
>
<Form-item
label=
"序号"
prop=
"sort"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.sort"
placeholder=
"置顶商品序号"
/>
</Form-item>
<Form-item
label=
"商品编号"
prop=
"itemCode"
style=
"width: 800px"
>
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
171082cb
...
...
@@ -4,9 +4,13 @@ $(function () {
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'序号'
,
name
:
'sort'
,
index
:
'sort'
,
width
:
40
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
40
,
formatter
:
imageFormat
},
{
label
:
'放大'
,
name
:
'itemBig'
,
index
:
'item_big'
,
width
:
40
,
formatter
:
function
(
value
,
grid
,
rows
)
{
return
'<span class="label label-info pointer" id="big" onmouseover="vm.Bigimg(
\'
'
+
rows
.
itemImg
+
'
\'
)" onmouseout="vm.noneImg()">放大<div id="ImgBox"></div></span> '
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
)
{
if
(
value
.
indexOf
(
';'
))
{
let
firstImg
=
value
.
split
(
';'
)[
0
];
return
'<img src="'
+
firstImg
+
'" style="width:50px;height:50px;" id="itemImg" />'
}
return
'<img src="'
+
value
+
'" style="width:50px;height:50px;" id="itemImg" //>'
}
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
60
},
...
...
@@ -24,38 +28,43 @@ $(function () {
{
label
:
'商品一级分类'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
80
},
{
label
:
'商品二级分类'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'商品三级分类'
,
name
:
'dname'
,
index
:
'itemDescritionId'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
6
0
,
formatter
:
itemStatusFormat
},
{
label
:
'状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
8
0
,
formatter
:
itemStatusFormat
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'创建人'
,
name
:
'uname'
,
index
:
'uname'
,
width
:
80
},
{
label
:
'操作'
,
index
:
'operate'
,
width
:
120
,
formatter
:
function
(
value
,
grid
,
rows
)
{
if
(
rows
.
itemTop
===
1
)
{
return
'<span class="label label-primary pointer" onclick="vm.itemUpward(
\'
'
+
rows
.
itemId
+
'
\'
)" ">上移</span> '
+
'<span class="label label-success pointer" onclick="vm.itemDownward(
\'
'
+
rows
.
itemId
+
'
\'
)" ">下移</span>  '
'<span class="label label-success pointer" onclick="vm.itemDownward(
\'
'
+
rows
.
itemId
+
'
\'
)" ">下移</span> '
+
'<input type="text" oninput="vm.itemOn(this)" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,
\'\'
)}else{this.value=this.value.replace(/
\\
D/g,
\'\'
)}"
\
n'
+
' onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,
\'
0
\'
)}else{this.value=this.value.replace(/
\\
D/g,
\'\'
)}" style="width:30px"> '
+
'<span class="label label-info pointer" onclick="vm.itemToptwo(
\'
'
+
rows
.
itemId
+
'
\'
,
\'
'
+
rows
.
sort
+
'
\'
)">置换</span> '
}
return
''
}
},
{
label
:
'操作'
,
index
:
'operate'
,
width
:
120
,
formatter
:
function
(
value
,
grid
,
rows
)
{
if
(
rows
.
itemTop
===
1
)
{
return
'<input type="text" oninput="vm.itemOn(this)" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,
\'\'
)}else{this.value=this.value.replace(/
\\
D/g,
\'\'
)}"
\
n'
+
' onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,
\'
0
\'
)}else{this.value=this.value.replace(/
\\
D/g,
\'\'
)}" style="width:30px"> '
+
'<span class="label label-info pointer" onclick="vm.itemToptwo(
\'
'
+
rows
.
itemId
+
'
\'
,
\'
'
+
rows
.
sort
+
'
\'
)">置换</span> '
// '<span class="label label-info pointer" id="big" onmouseover="vm.Bigimg(\'' + rows.itemImg + '\')" onmouseout="vm.noneImg()">放大<div id="ImgBox"></div></span> '
}
return
''
}
}
]
// {
// label: '操作', index: 'operate', width: 120, formatter: function (value, grid, rows) {
// if (rows.itemTop === 1) {
// return '<input type="text" oninput="vm.itemOn(this)" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,\'\')}else{this.value=this.value.replace(/\\D/g,\'\')}" \n' +
// ' onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,\'0\')}else{this.value=this.value.replace(/\\D/g,\'\')}" style="width:30px"> ' +
// '<span class="label label-info pointer" onclick="vm.itemToptwo(\'' + rows.itemId + '\',\'' + rows.sort + '\')">置换</span> '
// // '<span class="label label-info pointer" id="big" onmouseover="vm.Bigimg(\'' + rows.itemImg + '\')" onmouseout="vm.noneImg()">放大<div id="ImgBox"></div></span> '
// }
// return ''
// }
// }
],
height
:
200
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
itemsortTwo
:
''
,
itemsortTwo
:
''
,
templateList
:
[],
modal
:
false
,
showList
:
true
,
...
...
@@ -132,7 +141,7 @@ let vm = new Vue({
handleProductAttr_Batch
:
[],
},
methods
:
{
itemOn
(
e
,
sort
)
{
itemOn
(
e
,
sort
)
{
this
.
itemsortTwo
=
e
.
value
// if(e.value==sort){
// alert("不能相同序号")
...
...
@@ -146,26 +155,20 @@ let vm = new Vue({
// }
},
//放大镜
Bigimg
(
img
){
// alert(img)
var
i
=
img
.
indexOf
(
";"
);
if
(
i
>
0
){
var
itemImg
=
img
.
slice
(
0
,
i
)
}
else
{
var
itemImg
=
img
}
$
(
"#ImgBox"
).
html
(
`<img src="
${
itemImg
}
" alt="">`
).
css
(
'display'
,
'block'
)
bigImg
(
img
)
{
console
.
log
(
'img'
,
img
)
$
(
"#itemImg"
).
attr
(
"src"
).
css
({
"width"
:
"500px"
});
},
noneImg
(){
$
(
"#
ImgBox"
).
css
(
'display'
,
'none'
)
noneImg
()
{
$
(
"#
itemImg"
).
css
(
'display'
,
'none'
)
},
//商品位置置换
itemToptwo
(
id
,
sort
)
{
itemToptwo
(
id
,
sort
)
{
// console.log(this.itemsortTwo)
// let itemsortTwo = $("input#itemsortTwo").val();
if
(
sort
==
this
.
itemsortTwo
)
{
if
(
sort
==
this
.
itemsortTwo
)
{
alert
(
"不能相同序号"
)
}
else
{
}
else
{
Ajax
.
request
({
url
:
`../tbcfstationitem/exchangeItemSort?itemId=
${
id
}
&sort=
${
this
.
itemsortTwo
}
`
,
type
:
"GET"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论