Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
ufo-platform
·
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
caoyan
6 years ago
Commit
15dde48bdc5cad73e6320c6090e75d75075e5672
2 parents
8f397147
f95c7924
Merge branch 'master' of
http://git.yoho.cn/ufo/ufo-platform
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
98 deletions
web/src/main/webapp/html/product/productEdit.html
web/src/main/webapp/html/product/productList.html
web/src/main/webapp/html/product/productEdit.html
View file @
15dde48
...
...
@@ -216,7 +216,9 @@
editMaxSortId
:
$
(
'#editMaxSortId'
),
editMidSortId
:
$
(
'#editMidSortId'
),
editSeriesId
:
$
(
'#editSeriesId'
),
imageUpload
:
$
(
'#imageUpload'
)
imageUpload
:
$
(
'#imageUpload'
),
keyword
:
$
(
'#keyword'
),
colorSizeTable
:
$
(
'#colorSizeTable'
)
};
},
initFormData
:
function
(
detail
)
{
...
...
@@ -231,6 +233,7 @@
this
.
dom
.
editMaxSortId
.
combobox
(
'select'
,
detail
.
maxSortId
);
this
.
dom
.
editMidSortId
.
combobox
(
'select'
,
detail
.
midSortId
);
this
.
dom
.
editSeriesId
.
combobox
(
'select'
,
detail
.
seriesId
);
this
.
dom
.
keyword
.
textbox
(
'setValue'
,
detail
.
keyWords
);
$
(
'input[name=gender]'
).
eq
(
detail
.
gender
-
1
).
attr
(
'checked'
,
'true'
);
$
(
'.group-color li[data-id='
+
detail
.
colorId
+
']'
).
addClass
(
'actived'
);
...
...
@@ -250,7 +253,7 @@
width
:
460
});
$
(
'#keyword'
)
.
textbox
({
this
.
dom
.
keyword
.
textbox
({
width
:
700
});
...
...
@@ -334,7 +337,7 @@
required
:
true
,
missingMessage
:
"最高价不能为空"
});
$
(
'#colorSizeTable'
)
.
myDatagrid
({
this
.
dom
.
colorSizeTable
.
myDatagrid
({
fit
:
false
,
fitColumns
:
true
,
autoRowHeight
:
true
,
...
...
@@ -586,7 +589,7 @@
gender
:
+
$
(
'input[name="gender"]:checked'
).
val
(),
goodsName
:
$
(
'.goods-name'
).
length
>
0
&&
$
(
'.goods-name'
).
textbox
(
'getValue'
)
||
''
,
imageUrlList
:
imageUrlList
,
keyWords
:
$
(
'#keyword'
)
.
textbox
(
'getValue'
),
keyWords
:
that
.
dom
.
keyword
.
textbox
(
'getValue'
),
maxPrice
:
that
.
dom
.
editMaxPrice
.
textbox
(
'getValue'
),
maxSortId
:
+
that
.
dom
.
editMaxSortId
.
combobox
(
'getValue'
),
midSortId
:
+
that
.
dom
.
editMidSortId
.
combobox
(
'getValue'
),
...
...
@@ -656,14 +659,20 @@
dataType
:
"json"
,
type
:
"POST"
,
data
:
JSON
.
stringify
(
ajaxData
),
success
:
function
(
data
)
{
that
.
submitFlag
=
false
;
success
:
function
(
ret
)
{
$
.
messager
.
progress
(
"close"
);
$
.
messager
.
alert
(
'操作提示'
,
'提交成功!'
);
window
.
location
.
href
=
contextPath
+
"/html/product/productList.html"
;
that
.
submitFlag
=
false
;
if
(
ret
&&
ret
.
code
==
200
)
{
$
.
messager
.
alert
(
'操作提示'
,
'提交成功!'
);
window
.
location
.
href
=
contextPath
+
"/html/product/productList.html"
;
}
else
{
$
.
messager
.
alert
(
'操作提示'
,
ret
.
message
||
'提交失败'
);
}
},
error
:
function
(
err
)
{
that
.
submitFlag
=
false
;
$
.
messager
.
progress
(
"close"
);
$
.
messager
.
alert
(
'操作提示'
,
err
.
message
||
'提交失败'
);
}
});
...
...
@@ -673,10 +682,10 @@
mergeCells
:
function
()
{
this
.
colorSizeTableData
.
total
=
this
.
colorSizeTableData
.
rows
.
length
;
$
(
'#colorSizeTable'
).
datagrid
(
'loadData'
,
this
.
colorSizeTableData
);
$
(
'#colorSizeTable'
).
datagrid
(
'mergeCells'
,
{
index
:
0
,
field
:
'colorName'
,
rowspan
:
this
.
colorSizeTableData
.
total
});
$
(
'#colorSizeTable'
).
datagrid
(
'mergeCells'
,
{
index
:
0
,
field
:
'goodsName'
,
rowspan
:
this
.
colorSizeTableData
.
total
});
$
(
'#colorSizeTable'
).
datagrid
(
'resize'
);
this
.
dom
.
colorSizeTable
.
datagrid
(
'loadData'
,
this
.
colorSizeTableData
);
this
.
dom
.
colorSizeTable
.
datagrid
(
'mergeCells'
,
{
index
:
0
,
field
:
'colorName'
,
rowspan
:
this
.
colorSizeTableData
.
total
});
this
.
dom
.
colorSizeTable
.
datagrid
(
'mergeCells'
,
{
index
:
0
,
field
:
'goodsName'
,
rowspan
:
this
.
colorSizeTableData
.
total
});
this
.
dom
.
colorSizeTable
.
datagrid
(
'resize'
);
},
getUrlParam
:
function
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
...
...
web/src/main/webapp/html/product/productList.html
View file @
15dde48
...
...
@@ -21,8 +21,9 @@
<input
id=
"midSortId"
type=
"text"
/>
<input
id=
"brandId"
type=
"text"
/>
<input
id=
"shelveStatus"
type=
"text"
/>
<a
id=
"searchLinkButton"
class=
"easyui-linkbutton btn-info"
data-options=
"iconCls:'icon-search'"
>
筛选
</a>
</div>
<div
style=
"margin: 10px 0 0 30px;"
class=
"div_search"
>
<a
id=
"searchLinkButton"
class=
"easyui-linkbutton btn-info"
data-options=
"iconCls:'icon-search'"
>
筛选
</a>
<a
id=
"searchAllLinkButton"
class=
"easyui-linkbutton btn-info"
data-options=
"iconCls:'icon-search'"
>
全部
</a>
</div>
</div>
...
...
@@ -71,14 +72,9 @@
editable
:
false
,
valueField
:
'id'
,
textField
:
'text'
,
multiple
:
true
,
prompt
:
"二级分类"
,
loadFilter
:
function
(
data
)
{
data
=
defaultLoadFilter
(
data
);
/* for (var i = 0; i < data.length; i ++) {
$('#midSortId').combobox('select', data[i].id);
} */
return
data
;
return
defaultLoadFilter
(
data
);
}
});
$
(
'#midSortId'
).
combobox
(
'disable'
);
...
...
@@ -100,10 +96,10 @@
editable
:
false
,
data
:
[
{
"text"
:
"商品状态"
,
"value"
:
"-1"
,
"selected"
:
true
},
{
"text"
:
"待上架"
,
"value"
:
0
},
{
"text"
:
"已上架"
,
"value"
:
1
},
{
"text"
:
"已下架"
,
"value"
:
2
}
]
{
"text"
:
"待上架"
,
"value"
:
0
},
{
"text"
:
"已上架"
,
"value"
:
1
},
{
"text"
:
"已下架"
,
"value"
:
2
}
]
});
$
(
"#productTable"
).
myDatagrid
({
fit
:
true
,
...
...
@@ -162,10 +158,10 @@
align
:
"center"
,
formatter
:
function
(
value
,
rowData
)
{
var
str
=
"<a role='edit' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px;background-color: #5bc0de'>编辑</a>"
;
if
(
1
==
rowData
.
status
)
{
str
+=
"<a role='closeBrandSeries' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px;background-color: red'>关闭</a>"
;
if
(
1
==
rowData
.
shelveStatus
)
{
str
+=
"<a role='closeBrandSeries' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px;background-color: red'>下架</a>"
;
}
else
{
str
+=
"<a role='openBrandSeries' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px;background-color: orange'>
开启
</a>"
;
str
+=
"<a role='openBrandSeries' dataId='"
+
rowData
.
id
+
"' style='margin-left:10px;background-color: orange'>
上架
</a>"
;
}
return
str
;
}
...
...
@@ -186,7 +182,7 @@
editRow
(
id
);
}
});
//
关闭品牌
//
下架商品
$
(
this
).
myDatagrid
(
"getPanel"
).
find
(
"a[role='closeBrandSeries']"
).
linkbutton
({
iconCls
:
"icon-more"
,
onClick
:
function
()
{
...
...
@@ -194,7 +190,7 @@
}
});
//
开启品牌
//
上架
$
(
this
).
myDatagrid
(
"getPanel"
).
find
(
"a[role='openBrandSeries']"
).
linkbutton
({
iconCls
:
"icon-more"
,
onClick
:
function
()
{
...
...
@@ -244,81 +240,17 @@
}
else
{
window
.
location
.
href
=
contextPath
+
"/html/product/productEdit.html?id="
+
id
;
}
/* $(div).myDialog({
width: "600px",
height: "380px",
title: title,
href: contextPath + "/html/brandManage/brandSeries/editBrandSeries.html",
queryParams: {
id: id
},
modal: true,
collapsible: true,
cache: false,
buttons: [{
id: "saveBtn",
text: "保存",
handler: function () {
$.messager.confirm("确认", message, function (flag) {
if (flag) {
var sortId = $('#brandSeriesEditForm #brandId').combobox("getValue");
if (sortId == '' || sortId == null || sortId == undefined) {
$.messager.alert("提示", '请选择品牌!', "error");
return false;
}
var url = contextPath + "/brandSeries/saveOrUpdateBrandSeries";
$("#brandSeriesEditForm").form("submit", {
url: url,
onSubmit: function () {
if (!$("#brandSeriesEditForm").form("validate")) {
return false;
}
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后..."
});
return true;
},
success: function (data) {
$.messager.progress("close");
data = JSON.parse(data);
if (data.code == 200) {
$(div).dialog("close");
$("#productTable").myDatagrid("reload");
$.messager.show({
title: "提示",
msg: title + "成功!",
height: 120
});
} else {
$.messager.alert("失败", data.message, "error");
}
}
});
}
});
}
}, {
text: "关闭",
iconCls: "icon-cancel",
handler: function () {
$(div).dialog("close");
}
}]
}); */
}
function
updateBrandSeriesStatus
(
id
,
status
)
{
var
message
=
""
;
var
msg
=
""
;
if
(
status
==
1
)
{
message
=
"确认要开启吗?"
;
msg
=
"开启成功!"
;
message
=
"确认要上架吗?"
;
msg
=
"上架成功!"
;
}
else
{
message
=
"确认要关闭吗?"
;
msg
=
"关闭成功!"
;
message
=
"确认要下架吗?"
;
msg
=
"下架成功!"
;
}
window
.
top
.
$
.
messager
.
confirm
(
"确认"
,
message
,
function
(
flag
)
{
if
(
flag
)
{
...
...
@@ -328,7 +260,7 @@
interval
:
500
,
text
:
""
});
$
.
post
(
contextPath
+
"/
brandSeries/updateBrandSeries
Status"
,
{
$
.
post
(
contextPath
+
"/
product/changeProductShelf
Status"
,
{
"id"
:
id
,
"status"
:
status
},
function
(
data
)
{
...
...
Please
register
or
login
to post a comment