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
Email Patches
Plain Diff
Browse Files
Authored by
peuei
6 years ago
Commit
e95fa952580c11ab008668f4fd6dd41d10ba60fc
1 parent
cf24ef46
update 门店商品
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
702 additions
and
5 deletions
product/src/main/java/com/yoho/ufo/controller/product/StorageController.java
product/src/main/java/com/yoho/ufo/service/impl/StorageService.java
web/src/main/webapp/html/goods/storageLineShops/storageLineShopsDetail.html
web/src/main/webapp/html/goods/storageLineShops/storageLineShopsList.html
product/src/main/java/com/yoho/ufo/controller/product/StorageController.java
View file @
e95fa95
package
com
.
yoho
.
ufo
.
controller
.
product
;
import
com.yoho.ufo.service.IProductService
;
import
com.yoho.ufo.service.impl.StorageService
;
import
com.yohobuy.ufo.model.common.ApiResponse
;
import
com.yohobuy.ufo.model.common.PageResponseBO
;
...
...
@@ -36,4 +35,39 @@ public class StorageController {
LOGGER
.
info
(
"StorageController.storagePriceList param = {}"
,
bo
);
return
new
ApiResponse
(
storageService
.
storagePriceList
(
bo
));
}
/**
* 门店商品 菜单栏专用查询通道
*
* @param bo
* @return
*/
@RequestMapping
(
value
=
"/storageListLineShops"
)
public
ApiResponse
<
PageResponseBO
<
ProductResponceBo
>>
storageListLineShops
(
ProductRequestBo
bo
)
{
LOGGER
.
info
(
"StorageController.storageListLineShops param = {}"
,
bo
);
return
new
ApiResponse
(
storageService
.
storageListLineShops
(
bo
));
}
/**
* 门店商品 菜单栏 商品详情查询
*
* @param bo
* @return
*/
@RequestMapping
(
value
=
"/storagePriceListLineShops"
)
public
ApiResponse
<
PageResponseBO
<
ProductResponceBo
>>
storagePriceListLineShops
(
ProductRequestBo
bo
)
{
LOGGER
.
info
(
"StorageController.storagePriceListLineShops param = {}"
,
bo
);
return
new
ApiResponse
(
storageService
.
storagePriceListLineShops
(
bo
));
}
/**
* 获得服务系统时间
*
* @return
*/
@RequestMapping
(
value
=
"/getServerCurrentTime"
)
public
ApiResponse
<
Long
>
getServerCurrentTime
()
{
return
new
ApiResponse
(
System
.
currentTimeMillis
());
}
}
...
...
product/src/main/java/com/yoho/ufo/service/impl/StorageService.java
View file @
e95fa95
...
...
@@ -2,17 +2,18 @@ package com.yoho.ufo.service.impl;
import
com.yoho.core.common.utils.DateUtil
;
import
com.yoho.ufo.convert.ProductConvertService
;
import
com.yoho.ufo.dal.GoodsMapper
;
import
com.yoho.ufo.dal.ProductMapper
;
import
com.yoho.ufo.dal.StoragePriceMapper
;
import
com.yoho.ufo.dal.model.Goods
;
import
com.yoho.ufo.dal.model.Product
;
import
com.yoho.ufo.dal.model.StoragePrice
;
import
com.yoho.ufo.model.goodsmanage.ProductPool
;
import
com.yoho.ufo.util.CollectionUtil
;
import
com.yoho.ufo.util.ImagesConstant
;
import
com.yoho.ufo.util.ImagesHelper
;
import
com.yoho.ufo.util.OrikaUtils
;
import
com.yohobuy.ufo.model.common.ApiResponse
;
import
com.yohobuy.ufo.model.common.PageModel
;
import
com.yohobuy.ufo.model.common.PageResponseBO
;
import
com.yohobuy.ufo.model.request.product.ProductRequestBo
;
import
com.yohobuy.ufo.model.request.productpool.ProductPoolResponseBo
;
import
com.yohobuy.ufo.model.resp.product.ProductResponceBo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -20,7 +21,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by li.ma on 2018/9/18.
...
...
@@ -44,6 +47,9 @@ public class StorageService {
@Autowired
private
ProductAssistService
productAssistService
;
@Autowired
private
GoodsMapper
goodsMapper
;
//商品编码 商品名称 品牌 最低价 可售库存
public
PageResponseBO
<
ProductResponceBo
>
storageList
(
ProductRequestBo
bo
)
{
LOGGER
.
info
(
"StorageService storageList param = {}"
,
bo
);
...
...
@@ -107,4 +113,61 @@ public class StorageService {
return
new
PageResponseBO
<>(
count
,
responseBos
,
bo
.
getPage
(),
bo
.
getRows
());
}
/**
* 门店商品 菜单栏专用查询
*
* @param request
* @return
*/
public
PageResponseBO
<
ProductResponceBo
>
storageListLineShops
(
ProductRequestBo
request
)
{
LOGGER
.
info
(
"StorageService storageListLineShops param = {}"
,
request
);
PageResponseBO
<
ProductResponceBo
>
productPageRsp
=
storageList
(
request
);
/**
* 设置图片
*/
List
<
ProductResponceBo
>
productList
=
productPageRsp
.
getList
();
List
<
Integer
>
productIdList
=
CollectionUtil
.
distinct
(
productList
,
ProductResponceBo:
:
getId
);
List
<
Goods
>
goodsList
=
goodsMapper
.
selectByProductId
(
productIdList
);
Map
<
Integer
,
Goods
>
goodsMap
=
CollectionUtil
.
extractMap
(
goodsList
,
Goods:
:
getProductId
);
productList
.
forEach
(
respBo
->
{
Goods
goods
=
goodsMap
.
get
(
respBo
.
getId
());
if
(
goods
!=
null
)
{
respBo
.
setColorImage
(
ImagesHelper
.
getImageAbsoluteUrl
(
goods
.
getColorImage
(),
ImagesConstant
.
BUCKET_GOODS_IMG
));
}
});
return
productPageRsp
;
}
/**
* 门店商品 菜单栏专用查询
*
* @param bo
* @return
*/
public
PageResponseBO
<
ProductResponceBo
>
storagePriceListLineShops
(
ProductRequestBo
bo
)
{
LOGGER
.
info
(
"StorageService storagePriceListLineShops param = {}"
,
bo
);
PageResponseBO
<
ProductResponceBo
>
result
=
storagePriceList
(
bo
);
/**
* 排序 : 尺码小 价格低 创建时间前 的排序越靠前
*/
Collections
.
sort
(
result
.
getList
(),
(
o1
,
o2
)
->
{
int
compareSize
=
Integer
.
valueOf
(
o1
.
getSizeName
())
-
Integer
.
valueOf
(
o2
.
getSizeName
());
if
(
compareSize
<
0
)
return
-
1
;
else
if
(
compareSize
>
0
)
return
1
;
else
{
int
comparePrice
=
Integer
.
valueOf
(
o1
.
getSkupPrice
())
-
Integer
.
valueOf
(
o2
.
getSkupPrice
());
if
(
comparePrice
<
0
)
return
-
1
;
else
if
(
comparePrice
>
0
)
return
1
;
else
return
(
int
)
(
DateUtil
.
stringToDate
(
o1
.
getSkupCreateTime
(),
DateUtil
.
DATE_TIME_FORMAT
).
getTime
()
-
DateUtil
.
stringToDate
(
o2
.
getSkupCreateTime
(),
DateUtil
.
DATE_TIME_FORMAT
).
getTime
());
}
});
return
result
;
}
}
...
...
web/src/main/webapp/html/goods/storageLineShops/storageLineShopsDetail.html
0 → 100644
View file @
e95fa95
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Yoho!UFO运营平台
</title>
<script
src=
"/ufoPlatform/js/include.js"
></script>
<script
src=
"/ufoPlatform/js/ajaxfileupload.js"
></script>
</head>
<body
class=
"easyui-layout"
fit=
"true"
>
<div
region=
"north"
style=
"height: 160px"
>
<script>
document
.
write
(
addHead
(
'库存详情'
,
''
));
</script>
<style>
.div_search
input
{
margin-top
:
20px
;
}
.div_search
.easyui-linkbutton
{
margin-top
:
20px
;
}
</style>
<div
style=
"margin-left: 30px;"
class=
"div_search"
>
<input
id=
"status"
type=
"text"
/>
<!-- 状态 -->
<input
id=
"SKUP"
type=
"text"
>
<!-- SKU-P -->
<input
id=
"sellerUid"
type=
"text"
>
<!-- 卖家UID -->
<input
id=
"storageId"
type=
"text"
>
<!-- SKU -->
<input
id=
"sizeId"
type=
"text"
>
<!-- 尺码 -->
<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>
<a
id=
"returnList"
class=
"easyui-linkbutton btn-info"
data-options=
"iconCls:'icon-search'"
>
返回列表
</a>
</div>
</div>
<div
region=
"center"
>
<div
style=
"margin-left: 30px;margin-top: 20px;height: 660px"
>
<table
id=
"skupTable"
></table>
</div>
</div>
<script
type=
"text/javascript"
>
(
function
()
{
// 解析出需要 ID
var
productId
=
parseURL
(
window
.
location
.
href
).
productId
;
var
midSortId
=
parseURL
(
window
.
location
.
href
).
midSortId
;
// 状态枚举
var
ENUM
=
{
sku_p_status
:
{
0
:
'待付保证金'
,
1
:
'出售中'
,
2
:
'卖家取消支付'
,
3
:
'卖家支付超时'
,
4
:
'卖家取消出售'
,
100
:
'已出售'
,
101
:
'出售中'
,
102
:
'出售中'
,
200
:
'平台取消出售'
,
201
:
'已出售'
}
};
// 加载列表
$
(
"#skupTable"
).
myDatagrid
({
fit
:
true
,
fitColumns
:
true
,
nowrap
:
false
,
url
:
contextPath
+
"/storage/storagePriceListLineShops"
,
method
:
'POST'
,
queryParams
:
{
id
:
productId
,
status
:
1
// 默认查询出售中的
},
loadFilter
:
function
(
data
)
{
var
temp
=
defaultLoadFilter
(
data
);
temp
.
rows
=
temp
.
list
;
return
temp
;
},
columns
:
[[{
title
:
"SKU_P"
,
field
:
"skup"
,
width
:
40
,
align
:
"center"
},
{
title
:
"SKU"
,
field
:
"storageId"
,
width
:
80
,
align
:
"center"
,
},
{
title
:
"颜色"
,
field
:
"goodsName"
,
width
:
100
,
align
:
"center"
},
{
title
:
"尺码"
,
field
:
"sizeName"
,
width
:
80
,
align
:
"center"
},
{
title
:
"卖家UID"
,
field
:
"sellerUid"
,
width
:
200
,
align
:
"center"
},
{
title
:
"销售价"
,
field
:
"skupPrice"
,
width
:
50
,
align
:
"center"
,
},
{
title
:
"状态"
,
field
:
"status"
,
width
:
50
,
align
:
"center"
,
formatter
:
function
(
value
)
{
return
ENUM
.
sku_p_status
[
value
];
},
},
{
title
:
"创建时间"
,
field
:
"skupCreateTime"
,
width
:
130
,
align
:
"center"
},
{
title
:
"操作"
,
field
:
"operations"
,
width
:
120
,
align
:
"center"
,
formatter
:
function
(
value
,
rowData
)
{
if
(
rowData
.
status
==
1
)
{
return
"<a role='edit' dataId='"
+
rowData
.
skup
+
"' product_name='"
+
rowData
.
productName
+
"' style='margin-left:10px'>打印吊牌标签</a>"
;
}
else
{
return
''
;
}
}
}]],
cache
:
false
,
pagination
:
true
,
pageSize
:
50
,
idField
:
"id"
,
singleSelect
:
false
,
checkOnSelect
:
false
,
onLoadSuccess
:
function
()
{
$
(
this
).
myDatagrid
(
"getPanel"
).
find
(
"a[role='edit']"
).
linkbutton
({
iconCls
:
"icon-edit"
,
onClick
:
function
()
{
var
id
=
$
(
this
).
attr
(
"dataId"
);
// sku-p
editRow
(
id
,
$
(
this
).
attr
(
"product_name"
));
// 商品名称
}
});
}
});
// 执行打印吊牌标签
function
editRow
(
skup
)
{
var
param
=
{
type
:
"shopProduct"
,
header
:
"数据|码|EPC"
};
var
codeTemplate
=
"https://o.yohobuy.com/ufo?p={storeId_Uid}&skup={skup}&productId={skn}&skn={skn}"
;
var
content
=
codeTemplate
.
replace
(
'{storeId_Uid}'
,
[
"70"
,
","
,
"500031170"
].
join
(
""
));
content
=
content
.
replace
(
'{skup}'
,
skup
);
content
=
content
.
replace
(
'{skn}'
,
productId
);
$
.
ajax
({
contentType
:
"application/json"
,
dataType
:
"json"
,
type
:
"GET"
,
async
:
false
,
url
:
contextPath
+
"/storage/storagePriceListLineShops"
,
success
:
function
(
result
)
{
if
(
result
.
code
!=
200
||
!
result
.
data
||
result
.
data
.
length
==
0
)
{
return
;
}
var
epc
=
(
"00000000"
+
skup
).
substr
(
-
8
)
+
"000"
+
result
.
data
;
param
[
"codeList[0]"
]
=
[
content
,
"|"
,
skup
,
"|"
,
epc
].
join
(
""
)
}
});
}
// 解析URL
function
parseURL
(
url
)
{
var
url
=
url
.
split
(
"?"
)[
1
];
var
para
=
url
.
split
(
"&"
);
var
len
=
para
.
length
;
var
res
=
{};
var
arr
=
[];
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
arr
=
para
[
i
].
split
(
"="
);
res
[
arr
[
0
]]
=
arr
[
1
];
}
return
res
;
}
// 返回列表页
$
(
'#returnList'
).
linkbutton
({
onClick
:
function
()
{
location
.
href
=
contextPath
+
"/html/goods/storageLineShops/storageLineShopsList.html"
;
}
});
// 加载搜索栏 状态
$
(
"#status"
).
myCombobox
({
prompt
:
"状态"
,
width
:
200
,
data
:
[{
id
:
'0'
,
text
:
'待付保证金'
},
{
id
:
'2'
,
text
:
'卖家取消支付'
},
{
id
:
'3'
,
text
:
'卖家支付超时'
},
{
id
:
'1'
,
text
:
'出售中'
},
{
id
:
'4'
,
text
:
'卖家取消出售'
},
{
id
:
'200'
,
text
:
'平台取消出售'
},
{
id
:
'100'
,
text
:
'已出售'
}],
valueField
:
"id"
,
textField
:
"text"
});
// 加载尺码
$
.
ajax
({
contentType
:
"application/json"
,
dataType
:
"json"
,
type
:
"GET"
,
url
:
contextPath
+
'/size/queryAllSize4Goods?sortId='
+
midSortId
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
||
!
data
.
data
||
data
.
data
.
length
==
0
)
{
return
;
}
$
(
"#sizeId"
).
myCombobox
({
prompt
:
"尺码"
,
width
:
200
,
data
:
data
.
data
,
valueField
:
"id"
,
textField
:
"text"
});
}
});
// 加载其他
$
(
"#SKUP"
).
textbox
({
prompt
:
"SKU_P"
});
$
(
"#sellerUid"
).
textbox
({
prompt
:
"卖家UID"
});
$
(
"#storageId"
).
textbox
({
prompt
:
"SKU"
});
// 提取搜索参数
function
getParams
()
{
var
status
=
$
(
'#status'
).
combobox
(
'getValue'
);
var
skup
=
$
(
'#SKUP'
).
textbox
(
'getValue'
);
var
sellerUid
=
$
(
'#sellerUid'
).
textbox
(
'getValue'
);
var
storageId
=
$
(
'#storageId'
).
textbox
(
'getValue'
);
var
sizeId
=
$
(
'#sizeId'
).
combobox
(
'getValue'
);
var
param
=
{
'id'
:
productId
};
if
(
undefined
!==
status
&&
null
!==
status
&&
""
!==
status
)
{
param
.
status
=
status
;
}
if
(
undefined
!==
skup
&&
null
!==
skup
&&
""
!==
skup
)
{
param
.
skup
=
skup
;
}
if
(
undefined
!==
sellerUid
&&
null
!==
sellerUid
&&
""
!==
sellerUid
)
{
param
.
sellerUid
=
sellerUid
;
}
if
(
undefined
!==
storageId
&&
null
!==
storageId
&&
""
!==
storageId
)
{
param
.
storageId
=
storageId
;
}
if
(
undefined
!==
sizeId
&&
null
!==
sizeId
&&
""
!==
sizeId
)
{
param
.
sizeId
=
sizeId
;
}
return
param
;
}
// 过滤搜索
$
(
"#searchLinkButton"
).
linkbutton
({
onClick
:
function
()
{
var
param
=
getParams
();
$
(
"#skupTable"
).
myDatagrid
(
"load"
,
param
);
}
});
// 搜索全部
$
(
"#searchAllLinkButton"
).
linkbutton
({
onClick
:
function
()
{
$
(
"#skupTable"
).
myDatagrid
(
"load"
,
{
'id'
:
productId
});
}
});
}())
</script>
</body>
</html>
\ No newline at end of file
...
...
web/src/main/webapp/html/goods/storageLineShops/storageLineShopsList.html
0 → 100644
View file @
e95fa95
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Yoho!UFO运营平台
</title>
<script
src=
"/ufoPlatform/js/include.js"
></script>
<script
src=
"/ufoPlatform/js/ajaxfileupload.js"
></script>
</head>
<body
class=
"easyui-layout"
fit=
"true"
>
<div
region=
"north"
style=
"height: 220px"
>
<script>
document
.
write
(
addHead
(
'门店商品'
,
''
));
</script>
<style>
.div_search
input
{
margin-top
:
20px
;
}
.div_search
.easyui-linkbutton
{
margin-top
:
20px
;
}
</style>
<div
style=
"margin-left: 30px;"
class=
"div_search"
>
<input
id=
"id"
type=
"text"
>
<!-- 商品编码 -->
<input
id=
"productName"
type=
"text"
>
<!-- 商品名称 -->
<input
id=
"maxSortId"
type=
"text"
>
<!-- 一级分类 -->
<input
id=
"middleSortId"
type=
"text"
>
<!-- 二级分类 -->
<input
id=
"brandName"
type=
"text"
>
<!-- 品牌名称 -->
<input
id=
"sellerUid"
type=
"text"
>
<!-- 卖家UID -->
<input
id=
"storageNum"
type=
"text"
>
<!-- 商品库存 -->
<input
id=
"storageId"
type=
"text"
>
<!-- SKU -->
<input
id=
"skup"
type=
"text"
>
<!-- SKU-P -->
<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>
<div
region=
"center"
>
<div
style=
"margin-left: 30px;margin-top: 20px;height: 660px"
>
<table
id=
"productTable"
></table>
</div>
</div>
<script
type=
"text/javascript"
>
(
function
()
{
// 加载列表
$
(
"#productTable"
).
myDatagrid
({
fit
:
true
,
fitColumns
:
true
,
nowrap
:
false
,
url
:
contextPath
+
"/storage/storageListLineShops"
,
method
:
'POST'
,
queryParams
:
{
sellerUid
:
500031170
// 默认查询该 UID
},
loadFilter
:
function
(
data
)
{
var
temp
=
defaultLoadFilter
(
data
);
temp
.
rows
=
temp
.
list
;
return
temp
;
},
columns
:
[[{
title
:
"商品编码"
,
field
:
"id"
,
width
:
40
,
align
:
"center"
},
{
title
:
"商品图片"
,
field
:
"colorImage"
,
width
:
40
,
align
:
"center"
,
formatter
:
function
(
value
)
{
return
'<img src="'
+
value
+
'" style="width: 48px; height: 48px;vertical-align: middle;">'
}
},
{
title
:
"商品名称"
,
field
:
"productName"
,
width
:
100
,
align
:
"center"
,
},
{
title
:
"品牌"
,
field
:
"brandName"
,
width
:
60
,
align
:
"center"
},
{
title
:
"最低价"
,
field
:
"currentPrice"
,
width
:
40
,
align
:
"center"
,
formatter
:
function
(
value
)
{
if
(
value
)
{
return
value
;
}
return
'--'
;
}
},
{
title
:
"可售库存"
,
field
:
"storage"
,
width
:
20
,
align
:
"center"
,
formatter
:
function
(
value
)
{
if
(
value
)
{
return
value
;
}
return
0
;
}
},
{
title
:
"操作"
,
field
:
"operations"
,
width
:
40
,
align
:
"center"
,
formatter
:
function
(
value
,
rowData
)
{
var
str
=
"<a role='edit' dataId='"
+
rowData
.
id
+
"' sortId = '"
+
rowData
.
midSortId
+
"' style='margin-left:10px'>库存详情</a>"
;
return
str
;
}
}]],
cache
:
false
,
pagination
:
true
,
pageSize
:
10
,
pageList
:
[
10
],
idField
:
"id"
,
singleSelect
:
false
,
checkOnSelect
:
false
,
onLoadSuccess
:
function
()
{
$
(
this
).
myDatagrid
(
"getPanel"
).
find
(
"a[role='edit']"
).
linkbutton
({
iconCls
:
"icon-edit"
,
onClick
:
function
()
{
var
id
=
$
(
this
).
attr
(
"dataId"
);
var
midSortId
=
$
(
this
).
attr
(
"sortId"
);
detailStorage
(
id
,
midSortId
);
}
});
}
});
// 获取品牌名称
$
.
ajax
({
contentType
:
"application/json"
,
dataType
:
"json"
,
type
:
"GET"
,
url
:
contextPath
+
'/brand/getBrandName'
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
||
!
data
.
data
||
data
.
data
.
length
==
0
)
{
return
;
}
$
(
"#brandName"
).
myCombobox
({
prompt
:
"品牌名称"
,
width
:
200
,
data
:
data
.
data
,
valueField
:
"id"
,
textField
:
"text"
});
}
});
// 商品库存
$
(
"#storageNum"
).
myCombobox
({
prompt
:
"商品库存"
,
width
:
200
,
data
:
[{
id
:
'1'
,
text
:
'有库存'
},
{
id
:
'0'
,
text
:
'无库存'
}],
valueField
:
"id"
,
textField
:
"text"
});
// 一级和二级分类 联动
var
mxSortCombobox
=
$
(
"#maxSortId"
);
var
mdSortCombobox
=
$
(
"#middleSortId"
);
var
sortComboboxUrl
=
contextPath
+
'/productSort/getLevel2SortBySortId?sortId='
mxSortCombobox
.
combobox
({
url
:
sortComboboxUrl
,
method
:
"get"
,
editable
:
false
,
valueField
:
'id'
,
textField
:
'text'
,
loadFilter
:
function
(
data
)
{
data
=
defaultLoadFilter
(
data
);
data
.
unshift
({
id
:
0
,
text
:
"一级品类"
});
return
data
;
},
onSelect
:
function
(
rec
)
{
if
(
0
===
rec
.
id
)
{
try
{
mdSortCombobox
.
combobox
(
'disable'
);
mdSortCombobox
.
combobox
(
'setValue'
,
'0'
);
}
catch
(
e
)
{
}
return
;
}
try
{
mdSortCombobox
.
combobox
(
'reload'
,
sortComboboxUrl
+
rec
.
id
);
mdSortCombobox
.
combobox
(
'enable'
);
mdSortCombobox
.
combobox
(
'setValue'
,
'0'
);
}
catch
(
e
)
{
}
},
loadFilter
:
function
(
data
)
{
data
=
defaultLoadFilter
(
data
);
data
.
unshift
({
id
:
0
,
text
:
"一级分类"
});
return
data
;
}
});
mdSortCombobox
.
combobox
({
method
:
"get"
,
editable
:
false
,
valueField
:
'id'
,
textField
:
'text'
,
data
:
[{
text
:
'二级分类'
,
id
:
'0'
}],
loadFilter
:
function
(
data
)
{
data
=
defaultLoadFilter
(
data
);
data
.
unshift
({
id
:
0
,
text
:
"请选择分类"
});
return
data
;
},
onSelect
:
function
(
rec
)
{
if
(
0
===
rec
.
id
)
{
return
;
}
},
loadFilter
:
function
(
data
)
{
data
=
defaultLoadFilter
(
data
);
data
.
unshift
({
id
:
0
,
text
:
"请选择二级分类"
});
return
data
;
}
});
// 其他搜索框
$
(
"#id"
).
textbox
({
prompt
:
"商品编码"
});
$
(
"#productName"
).
textbox
({
prompt
:
"商品名称"
});
$
(
"#sellerUid"
).
textbox
({
prompt
:
"卖家UID"
});
$
(
"#storageId"
).
textbox
({
prompt
:
"SKU"
});
$
(
"#skup"
).
textbox
({
prompt
:
"SKU-P"
});
// 筛选 过滤
$
(
"#searchLinkButton"
).
linkbutton
({
onClick
:
function
()
{
var
param
=
getParams
();
$
(
"#productTable"
).
myDatagrid
(
"load"
,
param
);
}
});
// 搜索全部
$
(
"#searchAllLinkButton"
).
linkbutton
({
onClick
:
function
()
{
$
(
"#productTable"
).
myDatagrid
(
"load"
,
{});
}
});
// 提取搜索参数
function
getParams
()
{
var
brandName
=
$
(
'#brandName'
).
combobox
(
'getValue'
);
var
storageNum
=
$
(
'#storageNum'
).
combobox
(
'getValue'
);
var
id
=
$
(
'#id'
).
textbox
(
'getValue'
);
var
productName
=
$
(
'#productName'
).
textbox
(
'getValue'
);
var
sellerUid
=
$
(
'#sellerUid'
).
textbox
(
'getValue'
);
var
storageId
=
$
(
'#storageId'
).
textbox
(
'getValue'
);
var
maxSortId
=
$
(
'#maxSortId'
).
combobox
(
'getValue'
);
var
midSortId
=
$
(
'#middleSortId'
).
combobox
(
'getValue'
);
var
skup
=
$
(
'#skup'
).
textbox
(
'getValue'
);
var
param
=
{};
if
(
undefined
!==
brandName
&&
null
!==
brandName
&&
""
!==
brandName
)
{
param
.
brandId
=
brandName
;
}
if
(
undefined
!==
storageNum
&&
null
!==
storageNum
&&
""
!==
storageNum
)
{
param
.
storageNum
=
storageNum
;
}
if
(
undefined
!==
id
&&
null
!==
id
&&
""
!==
id
)
{
param
.
id
=
id
;
}
if
(
undefined
!==
productName
&&
null
!==
productName
&&
""
!==
productName
)
{
param
.
productName
=
productName
;
}
if
(
undefined
!==
sellerUid
&&
null
!==
sellerUid
&&
""
!==
sellerUid
)
{
param
.
sellerUid
=
sellerUid
;
}
if
(
undefined
!==
storageId
&&
null
!==
storageId
&&
""
!==
storageId
)
{
param
.
storageId
=
storageId
;
}
if
(
undefined
!==
skup
&&
null
!==
skup
&&
""
!==
skup
)
{
param
.
skup
=
skup
;
}
if
(
maxSortId
!==
undefined
&&
null
!==
maxSortId
&&
""
!==
maxSortId
&&
0
!=
maxSortId
)
{
param
.
maxSortId
=
maxSortId
;
}
if
(
midSortId
!==
undefined
&&
null
!==
midSortId
&&
""
!==
midSortId
&&
0
!=
midSortId
)
{
param
.
midSortId
=
midSortId
;
}
return
param
;
}
// 跳转编辑页
function
detailStorage
(
id
,
midSortId
)
{
this
.
location
.
href
=
contextPath
+
"/html/goods/storageLineShops/storageLineShopsDetail.html?productId="
+
id
+
"&midSortId="
+
midSortId
;
}
}())
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment