Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
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
陶雨
9 years ago
Commit
8d9a2bd517f397ddd0b26f81ffd0a665039923dd
2 parents
56a7bf6b
37f2c0a4
master
...
feature/feature_v4.5_20160525
feature/feature_v4.6_20160525
yohobuy_portal_dev_v4.4_20160525
yohobuy_portal_dev_v4.5_20160601
yohobuy_portal_dev_v4.6_20160601
yohobuy_portal_dev_v4.7_20160616
4.4.0_20160531
4.3.6_20160517
4.3.3_20160512
4.3.2_20160511
4.3.1_20160509
yohobuy_portal_dev_v4.6_20160622
Merge branch 'release/1.6' of
http://git.dev.yoho.cn/platform/yohobuy-portal-fe
into release/1.6
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
928 additions
and
800 deletions
client/js/basegoods/edit.js
client/js/basegoods/goodsInfo.js
client/js/basegoods/index.js
client/js/common/tabTree.js
client/js/common/upload.js
client/js/goods/netsale-edit.js
client/js/goods/netsale.js
client/js/goods/partials/add-info.js
client/js/goods/partials/basic-info.js
client/js/goods/partials/goods-params.js
client/js/goods/partials/netsale-ty.js
client/js/goods/price-change.js
client/js/product/add.js
client/js/product/attr.js
client/js/supplier/edit.js
client/js/supplier/index.js
client/js/supplier/info.js
client/sass/common/global.scss
client/sass/module/_product.scss
server/config/common.js
server/interface/goods.js
server/interface/netSaleTy.js
server/interface/product.js
server/interface/store.js
server/interface/supplier.js
server/views/pages/goods/netsale-edit.html
server/views/pages/product/new-class.html
server/views/pages/product/product-attr.html
server/views/pages/store/index.html
server/views/pages/supplier/edit.html
server/views/partials/netsale/add-info.html
server/views/partials/netsale/basic-info.html
server/views/partials/netsale/goods-params.html
client/js/basegoods/edit.js
View file @
8d9a2bd
...
...
@@ -142,7 +142,9 @@ e.init();
if
(
RESPONSEDATA
.
isAuditing
!=
200
){
new
common
.
dropDown
({
el
:
"#brandId"
,
ajax
:
"brand"
});
new
common
.
dropDown
({
el
:
"#brandId"
,
ajax
:
"brand"
,
params
:
function
(){
status
:
1
}});
new
common
.
dropDown
({
el
:
"#shopId"
,
ajax
:
"sortbybrand"
,
params
:
function
(){
return
{
brandId
:
$
(
"#brandId"
).
val
()}
...
...
client/js/basegoods/goodsInfo.js
View file @
8d9a2bd
...
...
@@ -15,6 +15,7 @@ common.util.__ajax({url: '/base/goods/getData', data:{productSkn:param[2]}},func
data
.
data
.
ageLevel
=
data
.
data
.
ageLevel
.
replace
(
"1"
,
"成人"
).
replace
(
"2"
,
"大童"
).
replace
(
"3"
,
"小童"
);
data
.
data
.
gender
=
{
"1"
:
"男"
,
"2"
:
"女"
,
"3"
:
"通用"
}[
""
+
data
.
data
.
gender
];
data
.
data
.
grade
=
{
"0"
:
"否"
,
"1"
:
"是"
}[
""
+
data
.
data
.
grade
];
data
.
data
.
goodsSeason
=
{
"0"
:
"四季"
,
"1"
:
"春"
,
"2"
:
"夏"
,
"3"
:
"秋"
,
"4"
:
"冬"
,
"5"
:
"春夏"
,
"6"
:
"秋冬"
}[
""
+
data
.
data
.
goodsSeason
];
data
.
data
.
isPromotionalGifts
=
{
"N"
:
"否"
,
"Y"
:
"是"
}[
""
+
data
.
data
.
isPromotionalGifts
];
data
.
data
.
isLimited
=
{
"N"
:
"否"
,
"Y"
:
"是"
}[
""
+
data
.
data
.
isLimited
];
data
.
data
.
isLimitbuy
=
{
"N"
:
"否"
,
"Y"
:
"是"
}[
""
+
data
.
data
.
isLimitbuy
];
...
...
client/js/basegoods/index.js
View file @
8d9a2bd
...
...
@@ -148,6 +148,8 @@ var t = new common.tab({
var
g
=
new
common
.
grid
({
el
:
'#basicTable'
,
parms
:
function
()
{
var
select
=
tabTree
.
getAddress
();
console
.
log
(
t
.
active
);
return
{
productSkn
:
common
.
util
.
__input
(
"productSkn"
),
...
...
@@ -160,7 +162,10 @@ var g = new common.grid({
isOutLets
:
common
.
util
.
__input
(
"isOutLets"
),
isAdvance
:
common
.
util
.
__input
(
"isAdvance"
),
isAuditing
:
AuditEnum
.
status
[
t
.
active
],
sortId
:
tabTree
.
selected
.
length
>
0
?
tabTree
.
selected
[
tabTree
.
selected
.
length
-
1
].
id
:
""
maxSortId
:
select
[
0
]?
select
[
0
].
id
:
""
,
middleSortId
:
select
[
1
]?
select
[
1
].
id
:
""
,
smallSortId
:
select
[
2
]?
select
[
2
].
id
:
""
,
sortId
:
select
[
3
]?
select
[
3
].
id
:
""
};
},
columns
:
[
...
...
client/js/common/tabTree.js
View file @
8d9a2bd
...
...
@@ -102,9 +102,9 @@ tabTree.prototype= {
g
.
dom
[
"cityshow"
].
on
(
"click"
,
"span>a"
,
function
(
event
)
{
var
rowid
=
$
(
this
).
attr
(
"data"
).
split
(
"_"
)[
1
];
g
.
select
(
g
.
records
[
rowid
]);
if
(
p
.
stepMet
!=
null
&&
g
.
selected
.
length
!=
p
.
datas
.
length
)
{
p
.
stepMet
(
g
.
selected
,
g
.
active_count
)
}
// if (p.stepMet != null && g.selected.length != p.datas.length) {
// p.stepMet(g.selected, g.active_count)
// }
g
.
changeVolume
();
if
(
!
p
.
url
){
g
.
setHeadVal
();
...
...
@@ -127,7 +127,7 @@ tabTree.prototype= {
for
(
var
i
=
g
.
active_count
+
1
;
i
<
p
.
datas
.
length
;
i
++
)
{
$
(
"span"
,
g
.
dom
[
"chooseArea"
]).
eq
(
i
).
html
(
p
.
columns
[
i
].
text
)
}
if
(
g
.
active_count
+
1
<=
3
)
{
if
(
g
.
active_count
+
1
<=
p
.
columns
.
length
-
1
)
{
g
.
active_count
++
;
var
_next
=
g
.
active_count
;
if
(
_data
.
item
)
{
...
...
@@ -136,9 +136,9 @@ tabTree.prototype= {
$
(
"span"
,
g
.
dom
[
"chooseArea"
]).
eq
(
g
.
active_count
).
html
(
_data
.
item
[
0
].
sortName
);
g
.
selected
[
g
.
selected
.
length
]
=
_data
.
item
[
0
];
g
.
active_count
++
;
_next
=
g
.
active_count
_next
=
g
.
active_count
;
}
if
(
g
.
active_count
<=
3
)
{
if
(
g
.
active_count
<=
p
.
columns
.
length
-
1
)
{
g
.
getData
(
g
.
_getParam
(
_next
))
}
else
{
g
.
active_count
=
0
;
...
...
@@ -197,7 +197,7 @@ tabTree.prototype= {
if
(
item
.
ishot
==
"true"
)
{
a
.
addClass
(
"imp"
)
}
a
.
attr
(
"data"
,
"Sns_"
+
count
).
html
(
item
.
sortName
);
a
.
attr
(
"data"
,
"Sns_"
+
count
).
attr
(
"title"
,
item
.
sortName
).
html
(
item
.
sortName
);
b
.
append
(
a
);
g
.
dom
[
"cityshow"
].
append
(
b
);
g
.
records
.
push
(
count
);
...
...
client/js/common/upload.js
View file @
8d9a2bd
...
...
@@ -60,6 +60,12 @@ $.fn.ajaxfileupload = function(options) {
status
:
false
,
message
:
'文件类型无效.只支持'
+
settings
.
valid_extensions
.
join
(
','
)
},
settings
.
params
]);
var
_$element
=
$element
.
clone
();
var
_$parent
=
$element
.
parent
();
$element
.
remove
();
_$parent
.
append
(
_$element
);
_$element
.
ajaxfileupload
(
settings
);
}
else
{
uploading_file
=
true
;
wrapElement
(
$element
);
...
...
client/js/goods/netsale-edit.js
View file @
8d9a2bd
...
...
@@ -120,7 +120,7 @@ $(document).on("click", "#saveAllInfo", function() {
res
=
res
.
data
;
if
(
res
.
code
==
'200'
)
{
e
.
$tip
(
res
.
message
,
function
()
{
history
.
go
(
-
1
);
//
history.go(-1);
},
'growl-success'
);
}
else
{
...
...
client/js/goods/netsale.js
View file @
8d9a2bd
...
...
@@ -74,6 +74,7 @@ var t = new common.tab({
if
(
columnname
==
1
||
columnname
==
2
)
{
editPostion
=
'#position9'
;
}
g
.
init
(
$
(
"#gridurl"
).
val
());
},
columns
:
[{
...
...
client/js/goods/partials/add-info.js
View file @
8d9a2bd
...
...
@@ -8,6 +8,8 @@ var e = new common.edit('#addinfo-wrap'),
comfort
=
NETSALEDATA
.
specialAttrBo
?
NETSALEDATA
.
specialAttrBo
.
wearSenses
:
""
;
/*上架补全信息*/
$
(
'#saveAddInfo'
).
on
(
'click'
,
function
()
{
e
.
submit
(
'/goods/product/saveAfterSaleInfo'
,
function
(
option
)
{
option
.
data
=
GOLABDATA
.
fire
(
'LYaddInfo'
);
...
...
@@ -31,7 +33,8 @@ GOLABDATA.on("LYaddInfo", function() {
}
});
option
.
data
.
productSkn
=
$
(
'#productSkn'
).
val
();
option
.
data
.
wearSense
=
sense
();
//option.data.wearSense = sense();
option
.
data
.
attributeProValuesTwo
=
JSON
.
stringify
(
attributeObj
());
function
sense
()
{
...
...
@@ -50,7 +53,19 @@ GOLABDATA.on("LYaddInfo", function() {
}
else
{
return
''
;
}
}
function
attributeObj
()
{
var
attributeArr
=
[];
$
(
'.attribute-group'
).
each
(
function
()
{
attributeArr
.
push
({
productSkn
:
option
.
data
.
productSkn
,
attributeId
:
$
(
this
).
find
(
'[id]'
).
attr
(
'id'
),
attributeValueId
:
$
(
this
).
find
(
'[id]'
).
val
().
split
(
'|'
).
join
(
','
)
})
});
return
attributeArr
;
}
option
.
debug
=
true
;
});
...
...
@@ -61,8 +76,8 @@ $.ajax({
url
:
'/goods/product/queryAfterSaleInfo'
,
data
:
{
saleType
:
2
,
displayPosition
:
2
,
categoryId
:
basicInfo
.
maxSortId
displayPosition
:
3
,
categoryId
:
basicInfo
.
smallSortId
},
dataType
:
'json'
,
success
:
function
(
res
)
{
...
...
@@ -88,6 +103,13 @@ $.ajax({
}
});
if
(
NETSALEDATA
.
attributeProValuesBosTwo
)
{
$
.
each
(
NETSALEDATA
.
attributeProValuesBosTwo
,
function
(
i
,
value
)
{
if
(
value
.
attributeId
==
data
.
attributes
.
data
[
i
].
attributeId
)
{
data
.
attributes
.
data
[
i
].
selectedValues
=
value
.
attributeValueId
.
replace
(
/,/g
,
"|"
);
}
});
}
$
.
each
(
data
.
productComfort
.
data
,
function
(
index
,
item
)
{
if
(
comfort
&&
comfort
[
index
])
{
...
...
@@ -143,4 +165,68 @@ $.ajax({
}
})
\ No newline at end of file
});
//去编辑商品名称
$
(
'#editProductName'
).
on
(
'click'
,
function
()
{
$
(
'#productName'
).
focus
();
})
/*商品参数*/
var
goodsParamArr
=
[];
var
goodsParamEdit
=
new
common
.
edit
(
'#goodsParamWrap'
);
common
.
util
.
__ajax
({
url
:
'/goods/product/queryAttributesByConfEx'
,
data
:
{
saleType
:
2
,
displayPosition
:
2
,
categoryId
:
basicInfo
.
smallSortId
}
},
function
(
res
)
{
var
data
=
res
.
data
;
if
(
NETSALEDATA
.
attributeProValuesBosOne
)
{
$
.
each
(
NETSALEDATA
.
attributeProValuesBosOne
,
function
(
i
,
value
)
{
if
(
value
.
attributeId
==
data
[
i
].
attributeId
)
{
data
[
i
].
selectedValues
=
value
.
attributeValueId
.
replace
(
/,/g
,
"|"
);
}
});
}
$
(
'#goodsParamWrap'
).
html
(
common
.
util
.
__template2
(
$
(
'#goodsParamTemp'
).
html
(),
{
data
:
data
}));
goodsParamEdit
.
init
();
},
true
);
GOLABDATA
.
on
(
"TYcaizhi"
,
function
()
{
return
goodsParamEdit
.
submit
(
''
,
function
(
option
)
{
$
(
'.goods-param-group'
).
each
(
function
()
{
goodsParamArr
.
push
({
productSkn
:
$
(
'#productSkn'
).
val
(),
attributeId
:
$
(
this
).
find
(
':hidden'
).
attr
(
'id'
),
attributeValueId
:
$
(
this
).
find
(
':hidden'
).
val
().
split
(
'|'
).
join
(
','
)
});
});
option
.
data
.
attributeProValuesOne
=
JSON
.
stringify
(
goodsParamArr
);
option
.
data
.
productSkn
=
$
(
'#productSkn'
).
val
();
option
.
debug
=
true
;
});
});
$
(
"#propertySave"
).
on
(
'click'
,
function
()
{
common
.
util
.
__ajax
({
url
:
'/netSale/saveProductParam'
,
data
:
GOLABDATA
.
fire
(
'TYcaizhi'
)
},
function
()
{});
});
/*console.log(goodsParamArr)
window.GOLABDATA.on('TYcaizhi', function() {
return {
attributeProValuesOne: JSON.stringify(goodsParamArr)
};
});*/
\ No newline at end of file
...
...
client/js/goods/partials/basic-info.js
View file @
8d9a2bd
...
...
@@ -41,6 +41,24 @@ var basicInfohtml = '',
attribute
:
{
1
:
'普通'
,
2
:
'赠品'
},
goodsSeason
:
{
0
:
'四季'
,
1
:
'春'
,
2
:
'夏'
,
3
:
'秋'
,
4
:
'冬'
,
5
:
'春夏'
,
6
:
'秋冬'
},
seasons
:
{
0
:
'四季'
,
1
:
'春'
,
2
:
'夏'
,
3
:
'秋'
,
4
:
'冬'
,
5
:
'春夏'
,
6
:
'秋冬'
}
},
basicInfo
=
NETSALEDATA
.
baseProductInfo
.
baseProduct
||
''
,
...
...
client/js/goods/partials/goods-params.js
View file @
8d9a2bd
var
$
=
require
(
'jquery'
),
/*
var $ = require('jquery'),
common = require('../../common/common');
var specialAttrBo = window.NETSALEDATA.specialAttrBo || {
...
...
@@ -9,8 +9,6 @@ var specialAttrBo = window.NETSALEDATA.specialAttrBo || {
var washTipsList = specialAttrBo.washTipsList;
var materialList = specialAttrBo.materialList;
console
.
log
(
window
.
NETSALEDATA
);
var e = new common.edit("#taoyu1");
common.util.__ajax({
...
...
@@ -59,6 +57,7 @@ common.util.__ajax({
});
}, true);
$("#propertySave").on('click', function() {
var washTips = $("#washTips").val() || "";
...
...
@@ -74,4 +73,4 @@ $("#propertySave").on('click', function() {
}, function() {
// body...
});
});
\ No newline at end of file
});*/
\ No newline at end of file
...
...
client/js/goods/partials/netsale-ty.js
View file @
8d9a2bd
...
...
@@ -2,95 +2,95 @@ var $ = require('jquery'),
common
=
require
(
'../../common/common'
);
if
(
window
.
NETSALEDATA
)
{
{
//商品参数
var
baseProduct
=
window
.
NETSALEDATA
.
baseProductInfo
.
baseProduct
;
var
specialAttrBo
=
{
productSkn
:
baseProduct
.
productSkn
,
washTipsList
:
[],
materialList
:
[]
};
if
(
window
.
NETSALEDATA
.
specialAttrBo
)
{
specialAttrBo
=
window
.
NETSALEDATA
.
specialAttrBo
;
}
var
washTipsList
=
specialAttrBo
.
washTipsList
||
[];
var
materialList
=
specialAttrBo
.
materialList
||
[];
var
e
=
new
common
.
edit
(
"#taoyu1"
);
//材质初始化
common
.
util
.
__ajax
({
url
:
'/netSale/queryAllBySortId4Select'
,
data
:
{
param
:
baseProduct
.
maxSortId
}
},
function
(
res
)
{
$
(
"#material-group"
).
html
(
common
.
util
.
__template2
(
$
(
"#material-params"
).
html
(),
res
||
{}));
var
materials
=
[];
for
(
var
i
=
0
;
i
<
materialList
.
length
;
i
++
)
{
materials
[
i
]
=
materialList
[
i
].
id
;
}
$
(
"#material"
).
val
(
materials
.
join
(
"|"
));
e
.
init
();
},
true
);
//{ //商品参数
/*var baseProduct = window.NETSALEDATA.baseProductInfo.baseProduct;
var specialAttrBo = {
productSkn: baseProduct.productSkn,
washTipsList: [],
materialList: []
};
if (window.NETSALEDATA.specialAttrBo) {
specialAttrBo = window.NETSALEDATA.specialAttrBo;
}
var washTipsList = specialAttrBo.washTipsList || [];
var materialList = specialAttrBo.materialList || [];
//洗涤提示初始化
common
.
util
.
__ajax
({
url
:
'/netSale/getAll4Select'
,
data
:
{}
},
function
(
res
)
{
$
(
"#washTip-group"
).
html
(
common
.
util
.
__template2
(
$
(
"#washTip-params"
).
html
(),
res
||
{}));
var
washTips
=
[];
for
(
var
i
=
0
;
i
<
washTipsList
.
length
;
i
++
)
{
washTips
[
i
]
=
washTipsList
[
i
].
sortId
;
}
$
(
"#washTips"
).
val
(
washTips
.
join
(
"|"
));
e
.
init
();
},
true
);
var e = new common.edit("#taoyu1");
//材质初始化
common.util.__ajax({
url: '/netSale/queryAllBySortId4Select',
data: {
param: baseProduct.maxSortId
}
}, function(res) {
$("#material-group").html(common.util.__template2($("#material-params").html(), res || {}));
var materials = [];
for (var i = 0; i < materialList.length; i++) {
materials[i] = materialList[i].id;
}
$("#material").val(materials.join("|"));
e.init();
}, true);
//洗涤提示初始化
common.util.__ajax({
url: '/netSale/getAll4Select',
data: {}
}, function(res) {
$("#washTip-group").html(common.util.__template2($("#washTip-params").html(), res || {}));
var washTips = [];
for (var i = 0; i < washTipsList.length; i++) {
washTips[i] = washTipsList[i].sortId;
}
$("#washTips").val(washTips.join("|"));
e.init();
}, true);
$
(
document
).
on
(
'change'
,
'.material'
,
function
()
{
var
items
=
$
(
"#material"
).
val
().
split
(
"|"
);
for
(
var
i
=
0
;
i
<
items
.
length
;
i
++
)
{
materialList
[
i
]
=
{
"id"
:
parseInt
(
items
[
i
])
};
}
});
$
(
document
).
on
(
'change'
,
'.washTips'
,
function
()
{
var
items
=
$
(
"#washTips"
).
val
().
split
(
"|"
);
for
(
var
i
=
0
;
i
<
items
.
length
;
i
++
)
{
washTipsList
[
i
]
=
{
"sortId"
:
parseInt
(
items
[
i
])
};
}
});
$(document).on('change', '.material', function() {
var items = $("#material").val().split("|");
for (var i = 0; i < items.length; i++) {
materialList[i] = {
"id": parseInt(items[i])
};
}
});
$
(
document
).
on
(
'click'
,
"#propertySave"
,
function
()
{
$(document).on('change', '.washTips', function() {
var items = $("#washTips").val().split("|");
for (var i = 0; i < items.length; i++) {
washTipsList[i] = {
"sortId": parseInt(items[i])
};
}
});*/
var
washTips
=
$
(
"#washTips"
).
val
()
||
""
;
var
productMaterial
=
$
(
"#material"
).
val
()
||
""
;
/*$(document).on('click', "#propertySave", function() {
common
.
util
.
__ajax
({
url
:
'/netSale/saveProductParam'
,
data
:
{
productSkn
:
specialAttrBo
.
productSkn
,
washTips
:
washTips
.
replace
(
/
\|
/g
,
","
),
productMaterial
:
productMaterial
.
replace
(
/
\|
/g
,
","
)
}
});
return
false
;
});
var washTips = $("#washTips").val() || "";
var productMaterial = $("#material").val() || "";
window
.
GOLABDATA
.
on
(
'TYcaizhi'
,
function
()
{
var
washTips
=
$
(
"#washTips"
).
val
()
||
""
;
var
productMaterial
=
$
(
"#material"
).
val
()
||
""
;
return
{
"washTips"
:
washTips
.
replace
(
/
\|
/g
,
","
),
"productMaterial"
:
productMaterial
.
replace
(
/
\|
/g
,
","
)
};
common.util.__ajax({
url: '/netSale/saveProductParam',
data: {
productSkn: specialAttrBo.productSkn,
washTips: washTips.replace(/\|/g, ","),
productMaterial: productMaterial.replace(/\|/g, ",")
}
});
}
return false;
});*/
/*window.GOLABDATA.on('TYcaizhi', function() {
var washTips = $("#washTips").val() || "";
var productMaterial = $("#material").val() || "";
return {
"washTips": washTips.replace(/\|/g, ","),
"productMaterial": productMaterial.replace(/\|/g, ",")
};
});*/
//}
{
//搜索关键词
...
...
client/js/goods/price-change.js
View file @
8d9a2bd
...
...
@@ -74,7 +74,22 @@ var g = new common.grid({
}
},
{
display
:
'供应商/店铺'
,
name
:
'supplier_name'
name
:
'supplier_name'
,
render
:
function
(
item
)
{
var
html
=
''
;
if
(
item
.
supplier_name
)
{
html
+=
item
.
supplier_name
;
if
(
item
.
shop_name
)
{
html
+=
'/'
;
}
}
if
(
item
.
shop_name
)
{
html
+=
item
.
shop_name
;
}
return
html
;
}
},
{
display
:
'性别'
,
name
:
'gender'
,
...
...
@@ -135,13 +150,20 @@ g.init($("#gridurl").val());
//单个变价
$
(
'#basicTable'
).
on
(
'click'
,
'.modify-btn'
,
function
()
{
var
skn
=
$
(
this
).
data
(
'skn'
),
that
=
this
;
that
=
this
,
$detail
=
$
(
that
).
parents
(
'tr'
).
next
(
'.product-detail'
);
if
(
$detail
.
size
()
==
0
)
{
$
(
that
).
addClass
(
'disabled'
);
}
if
(
$
(
that
).
data
(
'detail'
))
{
$
(
that
).
parents
(
'tr'
).
next
(
'.product-detail'
)
.
toggle
();
$
detail
.
toggle
();
return
;
}
$
.
ajax
({
type
:
'POST'
,
url
:
'/goods/getPrice'
,
...
...
@@ -151,6 +173,7 @@ $('#basicTable').on('click', '.modify-btn', function() {
}
}).
then
(
function
(
res
)
{
var
data
=
res
.
data
.
data
;
$
(
that
).
removeClass
(
'disabled'
);
$
(
that
).
data
(
'detail'
,
true
).
parents
(
'tr'
)
.
after
(
$
(
common
.
util
.
__template
(
$
(
"#template"
).
html
(),
data
)))
...
...
client/js/product/add.js
View file @
8d9a2bd
/*
*@time: 2016/1/29
*@author: chenglong
*/
// var $ = require('jquery');
// var edit = require('../common/edit');
// var Handlebars = require('yoho.handlebars');
// var dropDown = require('../common/dropDown');
// var selectOption =
// '{{# data}}' +
// '<option value="{{id}}" {{# select}}selected{{/ select}}>{{sortName}}</option>' +
// '{{/ data}}';
// var optionStr = Handlebars.compile(selectOption);
// function getAllSort(callback, selectId) {
// $.ajax({
// url: '/product/class/queryAllProductSortList',
// type: 'POST',
// dataType: 'json'
// }).then(function (d) {
// var firstSort = [],
// data = d.data.data,
// sortLen = data.length,
// i;
// var resData;
// for (i = 0; i < sortLen; i++) {
// if (!data[i].child) {
// if (data[i].id === selectId) {
// data[i].select = true;
// }
// firstSort.push(data[i]);
// }
// }
// callback(firstSort);
// });
// }
// function getChildSort(id, callback, selectId) {
// $.ajax({
// url: '/product/class/queryProductSortList',
// type: 'POST',
// dataType: 'json',
// data: {
// param: id
// }
// }).then(function (d) {
// var data = d.data.data;
// var dataLen = data.length;
// var i;
// for (i = 0; i < dataLen; i++) {
// if (data[i].id === selectId) {
// data[i].select = true;
// }
// }
// callback(data);
// });
// }
// var $editInput = $('#editId');
// var editLevel = $editInput.attr('level');
// var toNum = 1;
// function createLevelOneOption(selectedId, callback) {
// getAllSort(function (data) {
// $('#parentSortId').after(optionStr({
// data: data
// }));
// new dropDown({
// el:'#firstSortId'
// });
// if (callback) {
// callback();
// }
// }, selectedId*toNum);
// }
// function createLevelTwoOption(parentId, selectedId) {
// getChildSort(parentId*toNum, function (data) {
// $('#secondSortId').find('option:first').after(optionStr({
// data: data
// }));
// new dropDown({
// el:'#secondSortId'
// });
// }, selectedId*toNum);
// }
// console.log(editLevel);
// // 编辑
// if (editLevel) {
// switch (editLevel) {
// case "1":
// createLevelOneOption($editInput.val(), function () {
// getChildSort($editInput.val()*toNum, function (data) {
// $('#secondSortId').find('option:first').after(optionStr({
// data: data
// }));
// });
// });
// new dropDown({
// el:'#secondSortId'
// });
// break;
// case "2":
// createLevelOneOption($editInput.attr('pid'), function () {
// createLevelTwoOption($editInput.attr('pid'), $editInput.val());
// });
// break;
// default :
// break;
// }
// } else {
// // 添加
// getAllSort(function (data) {
// $('#parentSortId').after(optionStr({
// data: data
// }));
// });
// // 选择一\二级菜单时渲染二
// $('.level-select').change(function () {
// var id = $(this).val()*toNum;
// getChildSort(id, function (data) {
// $('#childSortId').after(optionStr({
// data: data
// }));
// });
// });
// new dropDown({
// el:'#firstSortId'
// });
// new dropDown({
// el:'#secondSortId'
// });
// }
// // 添加品类表单验证
// var newClassVerification = new edit("#new-class-form");
// newClassVerification.init();
// $(".new-class-btn").click(function(){
// var id = $(this).attr('data-id');
// var postUrl;
// var $this = $(this);
// var pid = $('#secondSortId').val();
// var ppid = $('#firstSortId').val();
// if (ppid*toNum) {
// $('#parentId').val(ppid);
// }
// if (pid*toNum) {
// $('#parentId').val(pid);
// }
// if (!!id) {
// postUrl = '/product/sort/update'
// } else {
// postUrl = $("#new-class-form").attr("action");
// }
// newClassVerification.submit(postUrl, function(option,that) {
// option.beforeSend = function () {
// $this.attr('disabled', 'disabled');
// };
// option.success=function(res){
// console.log(res);
// if (res.data.code === 200) {
// newClassVerification.$tip('提交成功');
// $this.removeAttr('disabled');
// setTimeout(function () {
// window.location.href = '/erpproduct/sort/index';
// }, 1000);
// }
// };
// option.error=function(res){
// console.log('error');
// }
// });
// return false;
// });
var
$
=
require
(
'jquery'
);
var
common
=
require
(
'../common/common'
);
var
RESPONSEDATA
=
{};
var
param
=
location
.
href
.
match
(
/
(
new|edit
)\/(\d
+
)
/
);
console
.
log
(
param
);
if
(
param
){
common
.
util
.
__ajax
({
url
:
'/product/class/getProductSort'
,
async
:
false
,
data
:{
param
:
param
[
2
]}
},
function
(
res
){
RESPONSEDATA
=
res
.
data
;
console
.
log
(
"RESPONSEDATA"
,
RESPONSEDATA
);
},
true
);
}
var
e
=
new
common
.
edit
(
"#new-class-form"
);
var
BLL
=
{
fillselect
:
function
(
items
,
selectedid
){
var
HtmlArr
=
[
"<option value='-1'>请选择</option>"
];
$
.
each
(
items
,
function
(
index
,
item
){
var
selected
=
(
item
.
id
==
selectedid
)?
"selected"
:
""
;
var
optionHtml
=
common
.
util
.
__template
(
"<option value='{value}' {selected} >{name}</option>"
,{
value
:
item
.
id
,
name
:
item
.
sortName
,
selected
:
selected
});
HtmlArr
.
push
(
optionHtml
);
});
return
HtmlArr
.
join
(
''
);
},
select2
:
function
(){
var
__id
=
$
(
"#firstSortId"
).
val
();
var
el
=
"#secondSortId"
;
if
(
__id
){
common
.
util
.
__ajax
({
url
:
'/product/class/queryProductSortList'
,
data
:{
param
:
__id
}},
function
(
res
){
$
(
el
).
html
(
BLL
.
fillselect
(
res
.
data
,
$
(
el
).
data
(
"value"
)));
},
true
);
}
else
{
$
(
el
).
html
(
BLL
.
fillselect
([]));
}
}
$
(
"#new-class-form"
).
html
(
common
.
util
.
__template2
(
$
(
"#template"
).
html
(),
RESPONSEDATA
));
var
NUMN
=
{
columns
:
[{
state
:
"prov"
,
text
:
"一级分类"
,
hide
:
false
,
addclass
:
""
},
{
state
:
"city"
,
text
:
"二级分类"
,
hide
:
false
,
addclass
:
""
},
{
state
:
"area"
,
text
:
"三级分类"
,
hide
:
false
,
addclass
:
""
}],
datas
:
[{
sortName
:
RESPONSEDATA
.
firstSortName
,
code
:
""
,
id
:
RESPONSEDATA
.
firstSortId
},
{
sortName
:
RESPONSEDATA
.
secondSortName
,
code
:
""
,
id
:
RESPONSEDATA
.
secondSortId
},
{
sortName
:
RESPONSEDATA
.
threeSortName
,
code
:
""
,
id
:
RESPONSEDATA
.
threeSortId
}]
}
var
sort
=
new
common
.
tabTree
(
"#sortTree"
,
NUMN
);
sort
.
init
();
e
.
on
(
"render"
,
function
(){
// new common.dropDown({el:"#firstSortId",ajax:"sortlist"});
// BLL.select2();
common
.
util
.
__ajax
({
url
:
'/product/class/queryAllProductSortList'
},
function
(
res
){
var
el
=
"#firstSortId"
;
$
(
el
).
html
(
BLL
.
fillselect
(
res
.
data
,
$
(
el
).
data
(
"value"
)));
new
common
.
dropDown
({
el
:
el
});
BLL
.
select2
();
},
true
);
});
var
e
=
new
common
.
edit
(
"#new-class-form"
);
e
.
on
(
"bind"
,
function
(){
$
(
"#firstSortId"
).
change
(
function
(){
BLL
.
select2
();
});
$
(
"#orderBy"
).
keyup
(
function
(){
$
(
this
).
val
(
$
(
this
).
val
().
replace
(
/^
\D
+$/g
,
''
));
});
...
...
@@ -279,12 +67,13 @@ e.init();
$
(
document
).
on
(
"click"
,
".btn-success"
,
function
(){
e
.
submit
(
$
(
"#new-class-form"
).
attr
(
"action"
),
function
(
option
){
var
_arr
=
[
"firstSortId"
,
"secondSortId"
];
for
(
var
i
in
_arr
){
if
(
!
option
.
data
[
_arr
[
i
]]){
delete
option
.
data
[
_arr
[
i
]];
}
}
var
sortArr
=
sort
.
getAddress
();
option
.
data
.
firstSortId
=
sortArr
[
0
]?
sortArr
[
0
].
id
:
-
1
;
option
.
data
.
secondSortId
=
sortArr
[
1
]?
sortArr
[
1
].
id
:
-
1
;
option
.
data
.
threeSortId
=
sortArr
[
2
]?
sortArr
[
2
].
id
:
-
1
;
console
.
log
(
option
.
data
);
// option.debug=true;
option
.
success
=
function
(
res
){
res
=
res
.
data
;
if
(
res
.
code
==
"200"
){
...
...
client/js/product/attr.js
View file @
8d9a2bd
...
...
@@ -2,11 +2,8 @@
*@time: 2016/2/1
*@author: chenglong
*/
var
$
=
require
(
'jquery'
);
common
=
require
(
'../common/common'
);
var
sortmenu
=
require
(
'../common/sortmenu'
);
// 把Y、N转换成是、否
...
...
@@ -18,14 +15,10 @@ function convertNorY(val) {
}
}
var
tableGird
=
new
common
.
grid
({
el
:
"#attr-table"
,
parms
:
function
()
{
console
.
log
(
window
.
sortid
);
return
{
categoryId
:
window
.
sortid
};
...
...
@@ -57,17 +50,69 @@ var tableGird = new common.grid({
]
});
var
propValueGrid
=
new
common
.
grid
({
el
:
"#prop-value-table"
,
columns
:
[
{
display
:
"ID"
,
name
:
"id"
,
render
:
function
(
items
)
{
//items.id=items.__index+1;
return
(
'<input id="id" class="form-control width110" value="'
+
items
.
id
+
'" type="text">'
);
}
},
{
display
:
"属性值"
,
name
:
"name"
,
render
:
function
(
items
)
{
return
(
'<input id="name" class="form-control width110 propValue" value="'
+
items
.
name
+
'" data-index="'
+
items
.
__index
+
'" type="text" placeholder="属性值">'
);
}
},
{
display
:
"操作"
,
name
:
"categoryId"
,
render
:
function
(
items
)
{
var
html
=
[];
if
(
items
.
__index
==
propValueGrid
.
__rows
.
length
-
1
)
{
html
.
push
(
'<button data-index="'
+
items
.
__index
+
'" class="btn btn-success btn-xs prop-add-btn">添加</button>'
);
}
html
.
push
(
'<button data-index="'
+
items
.
__index
+
'" class="btn btn-success btn-xs prop-del-btn">删除</button>'
);
return
html
.
join
(
""
);
}
}
]
});
$
(
document
).
on
(
"change"
,
".propValue"
,
function
(){
var
item
=
propValueGrid
.
__rows
[
$
(
this
).
data
(
"index"
)];
item
.
name
=
$
(
this
).
val
();
});
//增加属性值
$
(
document
).
on
(
'click'
,
'.prop-add-btn'
,
function
()
{
propValueGrid
.
__rows
.
push
({
name
:
""
,
id
:
propValueGrid
.
__rows
.
length
});
propValueGrid
.
reload
();
});
//删除属性值
$
(
document
).
on
(
'click'
,
'.prop-del-btn'
,
function
()
{
var
item
=
tableGird
.
rows
[
$
(
this
).
data
(
'index'
)];
propValueGrid
.
__rows
.
splice
(
$
(
this
).
data
(
'index'
),
1
);
propValueGrid
.
reload
();
});
sortmenu
.
init
(
function
()
{
tableGird
.
init
(
'/product/attr/queryProductAttributeList'
);
});
$
(
'#add-attri'
).
click
(
function
()
{
attributeOp
(
"添加"
,
'/product/attr/add'
,
{
categoryId
:
window
.
sortid
});
});
// 编辑产品属性
$
(
document
).
on
(
'click'
,
'.edit-class-btn'
,
function
()
{
var
item
=
tableGird
.
rows
[
$
(
this
).
data
(
'index'
)];
...
...
@@ -75,16 +120,49 @@ $(document).on('click', '.edit-class-btn', function () {
// $("#select2-shopsId-container").val(item.)
});
$
(
document
).
on
(
'change'
,
'#inputType'
,
function
()
{
showORHidePropValue
();
});
function
attributeOp
(
prefix
,
url
,
item
)
{
var
a
=
new
common
.
edit
(
".confirm"
);
common
.
dialog
.
confirm
(
prefix
+
"属性"
,
common
.
util
.
__template
(
$
(
"#template"
).
html
(),
item
),
function
()
{
if
(
item
.
attributeValues
)
{
propValueGrid
.
__rows
=
JSON
.
parse
(
item
.
attributeValues
);
}
else
{
propValueGrid
.
__rows
=
[{
'name'
:
""
}];
}
common
.
dialog
.
confirm
(
prefix
+
"属性"
,
common
.
util
.
__template
(
$
(
"#template"
).
html
(),
item
),
function
()
{
return
a
.
submit
(
url
,
function
(
option
)
{
option
.
data
.
categoryId
=
item
.
categoryId
;
option
.
data
.
attributeId
=
item
.
attributeId
;
var
inputType
=
$
(
'#inputType'
).
val
();
console
.
log
(
inputType
);
// 单行文本 或者 多行文本 时不显示表格
if
(
inputType
==
'textarea'
||
inputType
==
'text'
||
inputType
==
""
)
{
}
else
{
var
propVlaueArr
=
propValueGrid
.
__rows
.
splice
(
0
).
map
(
function
(
item
,
inex
){
return
{
id
:
item
.
id
,
name
:
item
.
name
}
});
option
.
data
.
attributeValues
=
JSON
.
stringify
(
propVlaueArr
);
}
//console.log(propVlaueArr);
//option.debug = true;
propValueGrid
.
__rows
=
[];
option
.
success
=
function
(
res
)
{
res
=
res
.
data
;
if
(
res
.
code
==
"200"
)
{
a
.
$tip
(
"提交成功"
,
function
()
{
...
...
@@ -104,7 +182,25 @@ function attributeOp(prefix, url, item) {
a
.
init
();
// 属性值列表的初始化
propValueGrid
.
init
(
propValueGrid
.
__rows
);
showORHidePropValue
();
}
function
showORHidePropValue
()
{
var
inputType
=
$
(
'#inputType'
).
val
();
// 单行文本 或者 多行文本 时不显示表格
if
(
inputType
==
'textarea'
||
inputType
==
'text'
||
inputType
==
""
)
{
$
(
'#attributeValues'
).
show
();
$
(
'#prop-value-table'
).
hide
();
}
else
{
$
(
'#attributeValues'
).
hide
();
$
(
'#prop-value-table'
).
show
();
}
}
...
...
client/js/supplier/edit.js
View file @
8d9a2bd
...
...
@@ -79,4 +79,12 @@ var edit=require('../common/edit');
},{
msg
:
"提交成功"
});
return
false
;
});
//供应商列表
$
(
"#updatecheck"
).
click
(
function
(){
submit
(
function
(
data
){
data
.
operations
=
2
;
data
.
status
=
200
;
},{
msg
:
"提交成功"
});
return
false
;
});
...
...
client/js/supplier/index.js
View file @
8d9a2bd
...
...
@@ -68,10 +68,10 @@ var ENUM={
HtmArr
.
push
(
'<a href="JavaScript:;" data-index="'
+
item
.
__index
+
'" class="btn btn-primary btn-xs btn-submit">提交</a>'
);
}
if
(
btnAuthority
.
resetlock
&&
item
.
isFreeze
==
"Y"
&&
item
.
status
==
"300"
){
if
(
btnAuthority
.
resetlock
&&
item
.
isFreeze
==
"Y"
&&
(
item
.
status
==
"300"
||
item
.
status
==
"900"
)
){
HtmArr
.
push
(
'<a href="javascript:;" data-index="'
+
item
.
__index
+
'" class="btn btn-warning btn-xs btn-recovery">恢复</a>'
);
}
if
(
btnAuthority
.
resetlock
&&
item
.
isFreeze
==
"N"
&&
item
.
status
==
"300"
){
if
(
btnAuthority
.
resetlock
&&
item
.
isFreeze
==
"N"
&&
(
item
.
status
==
"300"
||
item
.
status
==
"900"
)
){
HtmArr
.
push
(
'<a href="javascript:;" data-index="'
+
item
.
__index
+
'" class="btn btn-danger btn-xs btn-freeze">冻结</a>'
);
}
...
...
client/js/supplier/info.js
View file @
8d9a2bd
...
...
@@ -37,7 +37,7 @@ var $ = require('jquery'),
//提交操作
$
(
document
).
on
(
'click'
,
'.btn-submit'
,
function
()
{
Bll
.
toast
(
"确定要审核通过吗?"
,
function
(){
return
Bll
.
model
({
status
:
300
,
operations
:
2
});
return
Bll
.
model
({
status
:
300
});
});
});
//提交驳回
...
...
client/sass/common/global.scss
View file @
8d9a2bd
...
...
@@ -542,6 +542,9 @@ ul {
text-align
:
left
;
overflow
:
hidden
}
// .citybox div.cityshow span:after{
// content:"...";
// }
.citybox
div
.cityshow
span
a
{
padding
:
5px
7px
;
...
...
@@ -564,7 +567,7 @@ ul {
}
.citybox
div
.cityshow
span
{
width
:
65
px
;
width
:
100
px
;
padding-right
:
15px
;
display
:
inline-block
;
float
:
left
;
...
...
client/sass/module/_product.scss
View file @
8d9a2bd
...
...
@@ -13,7 +13,9 @@
.mainwrapper
.toggle-table
tr
.level3
td
:nth-of-type
(
1
)
{
text-indent
:
30px
;
}
.mainwrapper
.toggle-table
tr
.level4
td
:nth-of-type
(
1
)
{
text-indent
:
45px
;
}
.pattrscroll
{
background
:
#F7F7F7
;
...
...
server/config/common.js
View file @
8d9a2bd
...
...
@@ -14,10 +14,10 @@ var config = {
apiKey
:
'sd4H1ecAqlp'
,
//http: //192.168.102.214:8088/platform
// domain: 'http://172.16.6.240:8088/platform',
// domain:'http://172.16.6.240:8088/platform',王书生
// domain:'http://172.16.6.240:8088/platform',
//
王书生
// domain: 'http://172.16.6.252:9080',//陈超
// domain:'http://172.16.6.227:8088/platform',//玛丽
domain
:
'http://192.168.102.202:8088/platform'
,
domain
:
'http://172.16.6.227:8088/platform'
,
//玛丽
// domain: 'http://192.168.102.202:8088/platform',
loggers
:
{
api
:
{
level
:
'verbose'
,
...
...
server/interface/goods.js
View file @
8d9a2bd
...
...
@@ -271,8 +271,8 @@ exports.res = [{
// type: 'number'
// }]
},
{
//网销信息 -> 编辑页面渲染
route
:
'/goods/audit/info/:param'
,
//网销信息 -> 编辑页面渲染
route
:
'/goods/audit/info/:param'
,
method
:
'GET'
,
view
:
'pages/goods/netsale-edit'
,
// url: '/product/getNetSaleInfo',
...
...
@@ -355,6 +355,21 @@ exports.res = [{
},
{
name
:
'searchSortList'
,
type
:
'string'
},
{
name
:
'searchKeys'
,
type
:
'string'
},
{
name
:
'brandRelationList'
,
type
:
'string'
},
{
name
:
'attributeProValuesOne'
,
type
:
'string'
},
{
name
:
'attributeProValuesTwo'
,
type
:
'string'
},
{
name
:
'goodsImagesReq'
,
type
:
'string'
}]
},
{
//网销信息 -> 保存基本信息接口
...
...
@@ -401,12 +416,6 @@ exports.res = [{
name
:
'makeCrafts'
,
type
:
'string'
},
{
name
:
'pattern'
,
type
:
'string'
},
{
name
:
'style'
,
type
:
'string'
},
{
name
:
'salesPhrase'
,
type
:
'string'
},
{
...
...
@@ -415,6 +424,9 @@ exports.res = [{
},
{
name
:
'wearSense'
,
type
:
'string'
},
{
name
:
'attributeProValuesTwo'
,
type
:
'string'
}]
},
{
//网销信息 -> 查询补全信息
...
...
@@ -440,6 +452,20 @@ exports.res = [{
type
:
'number'
}],
isJsonRaw
:
true
},
attributes
:
{
url
:
'/product/queryAttributesByConf'
,
params
:
[{
name
:
'categoryId'
,
type
:
'number'
},
{
name
:
'displayPosition'
,
type
:
'number'
},
{
name
:
'saleType'
,
type
:
'number'
}],
isJsonRaw
:
true
}
}
},
{
...
...
@@ -505,12 +531,36 @@ exports.res = [{
type
:
'string'
}]
},
{
//网销信息 -> 关联逛
route
:
'/goods/article/queryArticlesBySKN'
,
method
:
'POST'
,
url
:
'/article/queryArticlesBySKN '
,
params
:
[{
name
:
'productSkn'
,
type
:
'number'
}]
},
{
//网销信息 -> 品牌关联列表
route
:
'/goods/brands/queryBrandsByStatus'
,
method
:
'POST'
,
url
:
'/erpproduct/brands/queryBrandsByStatus '
,
params
:
[]
},
{
//网销信息 -> 商品参数
route
:
'/goods/product/queryAttributesByConfEx'
,
method
:
'POST'
,
url
:
'/product/queryAttributesByConfEx'
,
params
:
[{
name
:
'categoryId'
,
type
:
'number'
},
{
name
:
'displayPosition'
,
type
:
'number'
},
{
name
:
'saleType'
,
type
:
'number'
}]
},
{
//价格管理 -> 代销变价页面渲染
route
:
'/goods/pricechange/index'
,
method
:
'GET'
,
...
...
server/interface/netSaleTy.js
View file @
8d9a2bd
exports
.
domain
=
require
(
'../config/common.js'
).
domain
;
//exports.domain = "http://172.16.6.227:8088/platform/";
//exports.domain = 'http://172.16.6.227:8088/platform'; //马力
exports
.
res
=
[
{
exports
.
res
=
[{
//保存搜索顺序
route
:
'/netSale/saveSearchSort'
,
method
:
'POST'
,
route
:
'/netSale/saveSearchSort'
,
method
:
'POST'
,
url
:
'/product/saveSearchSort'
,
params
:
[
{
name
:
'searchSortList'
,
type
:
'string'
}
]
},
{
params
:
[{
name
:
'searchSortList'
,
type
:
'string'
}]
},
{
//查找热搜词
route
:
'/netSale/queryHotSearchTerms'
,
method
:
'POST'
,
route
:
'/netSale/queryHotSearchTerms'
,
method
:
'POST'
,
url
:
'/searchWords/queryHotSearchTerms'
,
params
:
[
{
name
:
'page'
,
type
:
'number'
},
{
name
:
'size'
,
type
:
'number'
,
def
:
10
}
]
},
{
params
:
[{
name
:
'page'
,
type
:
'number'
},
{
name
:
'size'
,
type
:
'number'
,
def
:
10
}]
},
{
//查找洗涤提示
route
:
'/netSale/getAll4Select'
,
method
:
'POST'
,
route
:
'/netSale/getAll4Select'
,
method
:
'POST'
,
url
:
'/washTips/getAll4Select/'
,
params
:
[]
},
{
},
{
//查找材质参数
route
:
'/netSale/queryAllBySortId4Select'
,
method
:
'POST'
,
route
:
'/netSale/queryAllBySortId4Select'
,
method
:
'POST'
,
url
:
'/productMaterial/queryAllBySortId4Select'
,
params
:
[
{
name
:
'param'
,
type
:
'number'
}
]
},
{
params
:
[{
name
:
'param'
,
type
:
'number'
}]
},
{
//查找所有商品参数信息 //暂时没用
route
:
'/netSale/queryAllGoodsParams'
,
method
:
'POST'
,
route
:
'/netSale/queryAllGoodsParams'
,
method
:
'POST'
,
apis
:
{
washTipsList
:
{
url
:
'/washTips/getAll4Select/'
},
materialList
:
{
url
:
'productMaterial/queryAllBySortId4Select'
,
params
:
[
{
name
:
'param'
,
type
:
'number'
}
],
params
:
[{
name
:
'param'
,
type
:
'number'
}],
isJsonRaw
:
true
}
}
},
{
},
{
//保存搜索关键词
route
:
'/netSale/saveNetSaleSearchKeys'
,
method
:
'POST'
,
route
:
'/netSale/saveNetSaleSearchKeys'
,
method
:
'POST'
,
url
:
'/product/saveNetSaleSearchKeys'
,
params
:
[
{
name
:
'productSkn'
,
type
:
'number'
},
{
name
:
'searchKeys'
,
type
:
'string'
}
]
},
{
params
:
[{
name
:
'productSkn'
,
type
:
'number'
},
{
name
:
'searchKeys'
,
type
:
'string'
}]
},
{
//保存商品参数
route
:
'/netSale/saveProductParam'
,
method
:
'POST'
,
route
:
'/netSale/saveProductParam'
,
method
:
'POST'
,
url
:
'/product/saveProductParam'
,
params
:
[
{
name
:
'productSkn'
,
type
:
'number'
},
{
name
:
'washTips'
,
type
:
'string'
},
{
name
:
'productMaterial'
,
type
:
'string'
}
]
}
];
\ No newline at end of file
params
:
[{
name
:
'productSkn'
,
type
:
'number'
},
{
name
:
'attributeProValuesOne'
,
type
:
'string'
}]
}];
\ No newline at end of file
...
...
server/interface/product.js
View file @
8d9a2bd
exports
.
domain
=
require
(
'../config/common.js'
).
domain
;
// exports.domain ="http://172.16.6.227:8088/platform";
//路由配置
exports
.
res
=
[
...
...
@@ -57,6 +58,9 @@ exports.res = [
name
:
'secondSortId'
,
type
:
'Number'
},{
name
:
'threeSortId'
,
type
:
'Number'
},{
name
:
'orderBy'
,
type
:
'Number'
},{
...
...
@@ -69,12 +73,15 @@ exports.res = [
route
:
'/product/class/edit/:param'
,
method
:
'GET'
,
view
:
'pages/product/new-class'
,
url
:
'/product/getProductSort'
,
src
:
'/product/add'
,
data
:{
pagetitle
:
"修改品类"
,
action
:
"/product/sort/update"
},
}
},{
route
:
'/product/class/getProductSort'
,
url
:
'/product/getProductSort'
,
method
:
'POST'
,
params
:
[
{
name
:
'param'
,
...
...
@@ -103,6 +110,9 @@ exports.res = [
name
:
'secondSortId'
,
type
:
'Number'
},{
name
:
'threeSortId'
,
type
:
'Number'
},{
name
:
'orderBy'
,
type
:
'Number'
},{
...
...
@@ -127,159 +137,159 @@ exports.res = [
type
:
'Number'
}]
},
// {
// //商品管理>【产品属性】页面渲染
// route: '/erpproduct/attribute/index',
// method: 'GET',
// view: 'pages/product/product-attr',
// //url: '/product/queryAllProductSortList',
// url:'/product/queryProductSortListByConf',
// src: '/product/attr',
// params:[{
// name: 'status',
// type: 'String',
// def:1
// }]
// },
// {
// //商品管理>【产品属性ajax获取】
// route: '/product/attr/get',
// method: 'POST',
// url: '/product/getAttr',
// },{
// //商品管理>【添加产品属性ajax】
// route: '/product/attr/add',
// method: 'POST',
// url: '/product/addProductAttribute',
// params: [
// {
// name: 'attributeName',
// type: 'String'
// },{
// name: 'saleType',
// type: 'Number'
// },{
// name: 'inputType',
// type: 'String'
// },{
// name: 'attributeType',
// type: 'String'
// },{
// name: 'isMust',
// type: 'String'
// },{
// name: 'isSearch',
// type: 'String'
// },{
// name: 'maxValueLen',
// type: 'Number'
// },{
// name: 'isAllowAlias',
// type: 'String'
// },{
// name: 'orderBy',
// type: 'Number'
// },{
// name: 'state',
// type: 'Number'
// },{
// name: 'remark',
// type: 'String'
// },{
// name: 'attributeValues',
// type: 'String'
// },{
{
//商品管理>【产品属性】页面渲染
route
:
'/erpproduct/attribute/index'
,
method
:
'GET'
,
view
:
'pages/product/product-attr'
,
//url: '/product/queryAllProductSortList',
url
:
'/product/queryProductSortListByConf'
,
src
:
'/product/attr'
,
params
:[{
name
:
'status'
,
type
:
'String'
,
def
:
1
}]
},
{
//商品管理>【产品属性ajax获取】
route
:
'/product/attr/get'
,
method
:
'POST'
,
url
:
'/product/getAttr'
,
},{
//商品管理>【添加产品属性ajax】
route
:
'/product/attr/add'
,
method
:
'POST'
,
url
:
'/product/addProductAttribute'
,
params
:
[
{
name
:
'attributeName'
,
type
:
'String'
},{
name
:
'saleType'
,
type
:
'Number'
},{
name
:
'inputType'
,
type
:
'String'
},{
name
:
'attributeType'
,
type
:
'String'
},{
name
:
'isMust'
,
type
:
'String'
},{
name
:
'isSearch'
,
type
:
'String'
},{
name
:
'maxValueLen'
,
type
:
'Number'
},{
name
:
'isAllowAlias'
,
type
:
'String'
},{
name
:
'orderBy'
,
type
:
'Number'
},{
name
:
'state'
,
type
:
'Number'
},{
name
:
'remark'
,
type
:
'String'
},{
name
:
'attributeValues'
,
type
:
'String'
},{
// name: 'displayPosition',
// type: 'Number'
// },{
// name: 'categoryId',
// type: 'Number'
// }
// ]
// },{
// //商品管理>【更新产品属性ajax】
// route: '/product/attr/update',
// method: 'POST',
// url: '/product/updateProductAttribute',
// params: [
// {
// name: 'attributeName',
// type: 'String'
// },{
// name: 'saleType',
// type: 'Number'
// },{
// name: 'inputType',
// type: 'String'
// },{
// name: 'attributeType',
// type: 'String'
// },{
// name: 'isMust',
// type: 'String'
// },{
// name: 'isSearch',
// type: 'String'
// },{
// name: 'maxValueLen',
// type: 'Number'
// },{
// name: 'isAllowAlias',
// type: 'String'
// },{
// name: 'orderBy',
// type: 'Number'
// },{
// name: 'state',
// type: 'Number'
// },{
// name: 'remark',
// type: 'String'
// },{
// name: 'attributeValues',
// type: 'String'
// },{
name
:
'displayPosition'
,
type
:
'Number'
},{
name
:
'categoryId'
,
type
:
'Number'
}
]
},{
//商品管理>【更新产品属性ajax】
route
:
'/product/attr/update'
,
method
:
'POST'
,
url
:
'/product/updateProductAttribute'
,
params
:
[
{
name
:
'attributeName'
,
type
:
'String'
},{
name
:
'saleType'
,
type
:
'Number'
},{
name
:
'inputType'
,
type
:
'String'
},{
name
:
'attributeType'
,
type
:
'String'
},{
name
:
'isMust'
,
type
:
'String'
},{
name
:
'isSearch'
,
type
:
'String'
},{
name
:
'maxValueLen'
,
type
:
'Number'
},{
name
:
'isAllowAlias'
,
type
:
'String'
},{
name
:
'orderBy'
,
type
:
'Number'
},{
name
:
'state'
,
type
:
'Number'
},{
name
:
'remark'
,
type
:
'String'
},{
name
:
'attributeValues'
,
type
:
'String'
},{
// name: 'displayPosition',
// type: 'Number'
// },{
// name: 'attributeId',
// type: 'Number'
// },{
// name: 'categoryId',
// type: 'Number'
// }
// ]
// },{
// //商品管理【根据类目ID ajax查询属性列表】
// route: '/product/attr/queryProductAttributeList',
// method: 'POST',
// url: '/product/queryProductAttributeList',
// params: [
// {
// name: 'categoryId',
// type: 'Number'
// },
// {
// name: 'page',
// type: 'Number'
// },
// {
// name: 'size',
// type: 'Number'
// }
// ]
// },{
// //商品管理【根据类目ID ajax查询属性的详细信息】
// route: '/product/attr/getProductAttribute',
// method: 'POST',
// url: '/product/getProductAttribute',
// params: [
// {
// name: 'attributeId',
// type: 'Number'
// }
// ]
// }
name
:
'displayPosition'
,
type
:
'Number'
},{
name
:
'attributeId'
,
type
:
'Number'
},{
name
:
'categoryId'
,
type
:
'Number'
}
]
},{
//商品管理【根据类目ID ajax查询属性列表】
route
:
'/product/attr/queryProductAttributeList'
,
method
:
'POST'
,
url
:
'/product/queryProductAttributeList'
,
params
:
[
{
name
:
'categoryId'
,
type
:
'Number'
},
{
name
:
'page'
,
type
:
'Number'
},
{
name
:
'size'
,
type
:
'Number'
}
]
},{
//商品管理【根据类目ID ajax查询属性的详细信息】
route
:
'/product/attr/getProductAttribute'
,
method
:
'POST'
,
url
:
'/product/getProductAttribute'
,
params
:
[
{
name
:
'attributeId'
,
type
:
'Number'
}
]
}
];
\ No newline at end of file
...
...
server/interface/store.js
View file @
8d9a2bd
...
...
@@ -16,7 +16,11 @@ exports.res = [
level2title
:
"创建店铺管理"
,
level3title
:
"创建店铺列表"
},
dropCheckStatus
:
true
searchStatus
:[
{
value
:
"100"
,
name
:
"暂存"
},
{
value
:
"200"
,
name
:
"待审核"
},
{
value
:
"900"
,
name
:
"驳回"
}
]
},
src
:
'/store/index'
},{
...
...
@@ -27,12 +31,16 @@ exports.res = [
data
:
{
gridurl
:
'/supplier/store/indexPage'
,
authority
:
'{"btn":true,"info":"info3","operationStatus":2,"checkStatusArr":"200,300,900"}'
,
//300,200,900
dropCheckStatus
:
true
,
pagetitle
:{
level1title
:
"店铺管理"
,
level2title
:
"店铺信息管理"
,
level3title
:
"店铺信息列表"
}
},
searchStatus
:[
{
value
:
"200"
,
name
:
"审核中"
},
{
value
:
"300"
,
name
:
"通过"
},
{
value
:
"900"
,
name
:
"驳回"
}
]
},
src
:
'/store/index'
,
},{
...
...
server/interface/supplier.js
View file @
8d9a2bd
exports
.
domain
=
require
(
'../config/common.js'
).
domain
;
// exports.domain ="http://172.16.9.8:8080/yohobuy-platform-web";
//路由配置
exports
.
res
=
[
{
...
...
@@ -14,7 +14,7 @@ exports.res = [
searchStatus
:[
{
name
:
"暂存"
,
value
:
"100"
},
{
name
:
"审核中"
,
value
:
"200"
},
{
name
:
"
审核
驳回"
,
value
:
"900"
}
{
name
:
"驳回"
,
value
:
"900"
}
],
searchSort
:
true
,
pageTitle
:
"创建供应商"
...
...
@@ -30,8 +30,8 @@ exports.res = [
bottons
:
'{"resetlock":true,"updatecheck":true}'
,
gridurl
:
'/supplier/create/getManageSupplierList'
,
searchStatus
:[
{
name
:
"审核通过"
,
value
:
"300"
},
{
name
:
"审核驳回"
,
value
:
"900"
},
{
name
:
"通过"
,
value
:
"300"
},
{
name
:
"驳回"
,
value
:
"900"
},
{
name
:
"审核中"
,
value
:
"200"
}
],
searchIsfreez
:
true
,
...
...
@@ -107,7 +107,8 @@ exports.res = [
action
:
'/brand/supplier/add'
,
data
:{},
pageTitle
:
"添加供应商"
,
add
:
true
add
:
true
,
update
:
true
}
},
{
...
...
@@ -137,7 +138,7 @@ exports.res = [
data
:{
action
:
'/brand/action/update'
,
pageTitle
:
"修改供应商"
,
update
:
true
update
check
:
true
},
params
:[
{
...
...
server/views/pages/goods/netsale-edit.html
View file @
8d9a2bd
...
...
@@ -45,6 +45,7 @@
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<a
class=
"netsale-position"
href=
"javascript:;"
name=
"position9"
></a>
<a
id=
"editProductName"
class=
"btn btn-default"
href=
"javascript:;"
style=
"position: absolute;left: 40%;top: 20%;"
>
去编辑商品名称
</a>
<div
class=
"panel-btns"
style=
"display: none;"
>
<a
href=
""
class=
"panel-minimize tooltips"
data-toggle=
"tooltip"
title=
""
><i
class=
"fa fa-minus"
></i></a>
</div>
...
...
server/views/pages/product/new-class.html
View file @
8d9a2bd
...
...
@@ -28,100 +28,7 @@
<div
class=
"panel-body nopadding"
>
<form
id=
"new-class-form"
class=
"form-horizontal form-bordered"
method=
"post"
action=
"{{action}}"
>
<div
class=
"form-group"
>
<label
class=
"col-md-2 control-label"
>
物理类目
<span
class=
"red"
>
*
</span>
</label>
<div
class=
"col-md-5"
>
<input
id=
"sortName"
class=
"form-control"
required
type=
"text"
value=
"{{data.sortName}}"
placeholder=
"品类名称"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-md-2 control-label"
>
品类缩写
<span
class=
"red"
>
*
</span>
</label>
<div
class=
"col-md-5"
>
<input
id=
"sortInitials"
class=
"form-control"
required
type=
"text"
value=
"{{data.sortInitials}}"
placeholder=
"品类缩写"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-md-2 control-label"
>
一级分类
</label>
<div
class=
"col-md-5"
>
<select
id=
"firstSortId"
class=
"level-select width300"
data-value=
"{{data.firstSortId}}"
>
</select>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-md-2 control-label"
>
二级分类
</label>
<div
class=
"col-md-5"
>
<select
id=
"secondSortId"
class=
"form-control level-select width300"
data-value=
"{{data.secondSortId}}"
>
</select>
</div>
</div>
<!--<div class="form-group">
<label class="col-md-1 control-label">
三级分类
</label>
<div class="col-md-5">
<select id="thirdSortId" class="level-select width300" required data-placeholder="">
<option value="0">请选择</option>
</select>
</div>
</div>-->
<div
class=
"form-group"
>
<label
class=
"col-md-2 control-label"
>
排序
<span
class=
"red"
>
*
</span>
</label>
<div
class=
"col-md-5"
>
<input
id=
"orderBy"
class=
"form-control"
required
value=
"{{data.orderBy}}"
type=
"number"
placeholder=
""
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-md-2 control-label"
>
状态
</label>
<div
class=
"col-md-5"
>
<div
class=
"radio"
>
<label><input
type=
"radio"
value=
"1"
name=
"status"
>
开启
</label>
</div>
<div
class=
"radio"
>
<label><input
type=
"radio"
value=
"0"
name=
"status"
>
关闭
</label>
</div>
<input
id=
"status"
type=
"hidden"
value=
"{{data.status}}"
for=
"radio"
>
</div>
</div>
<input
id=
"id"
class=
"form-control"
type=
"hidden"
value=
"{{data.id}}"
>
<!--隐藏值-->
<!-- <div class="form-group hidden"> -->
<!-- <label class="col-md-1 control-label">ID</label>
<div class="col-md-5">
<input id="param" class="form-control" value="{{data.id}}" level="{{data.sortLevel}}" pid="{{data.parentId}}" type="text">
</div> -->
<!-- </div> -->
<!-- <div class="form-group hidden"> -->
<!-- <label class="col-md-1 control-label">parentID</label>
<div class="col-md-5">
<input id="parentId" class="form-control" value="{{data.parentId}}" type="text">
</div> -->
<!-- </div> -->
</form>
</div>
...
...
@@ -133,4 +40,61 @@
</div>
</div>
</div>
\ No newline at end of file
</div>
<script
type=
"text/template"
id=
"template"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-md-2 control-label"
>
物理类目
<
span
class
=
"red"
>*<
/span
>
<
/label
>
<
div
class
=
"col-md-5"
>
<
input
id
=
"sortName"
class
=
"form-control"
required
type
=
"text"
value
=
"[[sortName]]"
placeholder
=
"品类名称"
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-md-2 control-label"
>
品类缩写
<
span
class
=
"red"
>*<
/span
>
<
/label
>
<
div
class
=
"col-md-5"
>
<
input
id
=
"sortInitials"
class
=
"form-control"
required
type
=
"text"
value
=
"[[sortInitials]]"
placeholder
=
"品类缩写"
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-md-2 control-label"
>
分类
<
/label
>
<
div
class
=
"col-md-5"
>
<
div
id
=
"sortTree"
><
/div
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-md-2 control-label"
>
排序
<
span
class
=
"red"
>*<
/span
>
<
/label
>
<
div
class
=
"col-md-5"
>
<
input
id
=
"orderBy"
class
=
"form-control"
required
value
=
"[[orderBy]]"
type
=
"number"
placeholder
=
""
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-md-2 control-label"
>
状态
<
/label
>
<
div
class
=
"col-md-5"
>
<
div
class
=
"radio"
>
<
label
><
input
type
=
"radio"
value
=
"1"
name
=
"status"
>
开启
<
/label
>
<
/div
>
<
div
class
=
"radio"
>
<
label
><
input
type
=
"radio"
value
=
"0"
name
=
"status"
>
关闭
<
/label
>
<
/div
>
<
input
id
=
"status"
type
=
"hidden"
value
=
"[[status||'0']]"
for
=
"radio"
>
<
/div
>
<
/div
>
<
input
id
=
"id"
class
=
"form-control"
type
=
"hidden"
value
=
"[[id]]"
>
</script>
\ No newline at end of file
...
...
server/views/pages/product/product-attr.html
View file @
8d9a2bd
...
...
@@ -167,13 +167,16 @@
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
id
=
"propValue"
>
<
label
class
=
"col-md-3 control-label"
>
属性值
<
i
class
=
"red"
>*<
/i
>
<
/label
>
<
div
class
=
"col-md-6"
>
<
div
class
=
"col-md-6"
>
<
input
id
=
"attributeValues"
value
=
"{attributeValues}"
class
=
"form-control width300"
type
=
"text"
placeholder
=
"属性值"
required
=
"required"
>
<
div
id
=
"prop-value-table"
class
=
"table-responsive"
>
<
/div
>
<
/div
>
<
/div
>
...
...
server/views/pages/store/index.html
View file @
8d9a2bd
...
...
@@ -32,14 +32,24 @@
<div
class=
"panel-body"
>
<div
class=
"row"
>
{{#dropCheckStatus}}
<!--
{{#dropCheckStatus}}
<select name="status" id="status" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
<option value="-1" selected="">选择提交状态</option>
<option value="100">暂存</option>
<option value="200">待审核</option>
<option value="900">驳回</option>
</select>
{{/dropCheckStatus}}
{{/dropCheckStatus}} -->
{{# if searchStatus}}
<select
name=
"status"
id=
"status"
tabindex=
"-1"
title=
""
class=
"select2-offscreen brandBtn-group"
>
<option
value=
"-1"
selected=
""
>
选择提交状态
</option>
{{# each searchStatus}}
<option
value=
"{{value}}"
>
{{name}}
</option>
{{/ each}}
</select>
{{/ if}}
<select
name=
"supplier-name"
id=
"supplier-name"
style=
"width: 280px;"
tabindex=
"-1"
title=
""
class=
"select2-offscreen brandBtn-group brandBtn-group-lg"
>
<option
value=
"-1"
>
选择供应商
</option>
{{# supplierName}}
...
...
server/views/pages/supplier/edit.html
View file @
8d9a2bd
...
...
@@ -222,7 +222,12 @@
{{# add}}
<button
type=
"submit"
class=
"btn btn-info"
data-loading-text=
"暂存中..."
id=
"btnTemporary"
>
暂存
</button>
{{/ add}}
{{# update}}
<button
type=
"submit"
class=
"btn btn-success mr5"
data-loading-text=
"提交审核中..."
id=
"btnReview"
>
提交审核
</button>
{{/ update}}
{{# updatecheck}}
<button
type=
"submit"
class=
"btn btn-success mr5"
data-loading-text=
"提交审核中..."
id=
"updatecheck"
>
提交审核
</button>
{{/ updatecheck}}
</div>
</div>
</div>
...
...
server/views/partials/netsale/add-info.html
View file @
8d9a2bd
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-btns"
style=
"display: none;"
>
<a
href=
""
class=
"panel-minimize tooltips"
data-toggle=
"tooltip"
title=
""
><i
class=
"fa fa-minus"
></i></a>
</div>
<h2
class=
"panel-title"
>
补全信息
</h2>
...
...
@@ -13,59 +15,116 @@
</div>
</div>
<script
type=
"text/template"
id=
"addInfoTemp"
>
<
div
id
=
"productStyleWrap"
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
商品风格:
<
/div
>
<
div
class
=
"col-sm-11"
>
[[
each
productStyle
as
a
index
]]
[[
if
index
==
"data"
]]
[[
each
a
as
b
index
]]
[[
if
index
==
"attributeValueList"
]]
[[
each
b
as
c
index
]]
<
label
style
=
"cursor: pointer;"
><
input
type
=
"checkbox"
name
=
"style"
value
=
"[[c]]"
>
[[
c
]]
<
/label
>
[[
/each]
]
[[
/if]
]
[[
/each]
]
[[
/if]
]
[[
/each]
]
<
input
id
=
"style"
type
=
"hidden"
for
=
"checkbox"
value
=
"[[style]]"
>
<
/div
>
<!-- <div id="productStyleWrap" class="form-group">
<div class="col-sm-1">商品风格:</div>
<div class="col-sm-11">
[[each productStyle as a index]]
[[if index=="data"]]
[[each a as b index]]
[[if index=="attributeValueList"]]
[[each b as c index]]
<label style="cursor: pointer;"><input type="checkbox" name="style" value="[[c]]">[[c]]</label>
[[/each]]
[[/if]]
[[/each]]
[[/if]]
[[/each]]
<input id="style" type="hidden" for="checkbox" value="[[style]]">
</div>
<
div
id
=
"productElementsWrap"
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
图案纹理:
<
/div
>
<
div
class
=
"col-sm-11"
>
[[
each
productElements
as
a
index
]]
[[
if
index
==
"data"
]]
[[
each
a
as
b
index
]]
[[
if
index
==
"attributeValueList"
]]
[[
each
b
as
c
index
]]
<
label
style
=
"cursor: pointer;"
><
input
type
=
"checkbox"
name
=
"pattern"
value
=
"[[c]]"
>
[[
c
]]
<
/label
>
[[
/each]
]
[[
/if]
]
[[
/each]
]
[[
/if]
]
</div>
<div id="productElementsWrap" class="form-group">
<div class="col-sm-1">图案纹理:</div>
<div class="col-sm-11">
[[each productElements as a index]]
[[if index=="data"]]
[[each a as b index]]
[[if index=="attributeValueList"]]
[[each b as c index]]
<label style="cursor: pointer;"><input type="checkbox" name="pattern" value="[[c]]">[[c]]</label>
[[/each]]
[[/if]]
[[/each]]
[[/if]]
[[/each]]
<input id="pattern" type="hidden" for="checkbox" value="[[pattern]]">
</div>
</div>
<div class="making-process-wrap form-group">
<label>制作工艺:</label>
<span>
[[each makingProcess as a index]]
[[each a.items as b index]]
<label style="cursor: pointer;"><input type="checkbox" name="makeCrafts" value="[[b]]">[[b]]</label>
[[/each]]
[[/each]]
<
input
id
=
"pattern"
type
=
"hidden"
for
=
"checkbox"
value
=
"[[pattern]]"
>
<
/div
>
<input id="makeCrafts" type="hidden" for="checkbox" value="[[makeCrafts]]">
</span>
</div>
<div id="wearSenseWrap" class="form-group">
<label>舒适度:</label>
[[each productComfort as a index]]
[[if index=="data"]]
[[each a as b index]]
<div style="display: inline-block;width: 140px;">
<label>[[b.text]]</label>
<select name="[[b.id]]" class="form-control">
<option value="">请选择</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<input type="hidden" value="[[b.value]]">
</div>
[[/each]]
[[/if]]
[[/each]]
</div>-->
<script
type=
"text/template"
id=
"addInfoTemp"
>
[[
each
attributes
as
a
index
]]
[[
if
index
==
"data"
]]
[[
each
a
as
b
index
]]
<
div
class
=
"attribute-group form-group"
>
<
label
>
[[
b
.
attributeName
]]
:
<
/label
>
[[
if
b
.
inputType
==
'select'
]]
<
div
style
=
"display: inline-block;width: 280px;"
>
<
select
class
=
"form-control"
id
=
"[[b.attributeId]]"
value
=
"[[b.selectedValues||'']]"
>
[[
each
b
.
idNameList
as
c
index
]]
<
option
value
=
"[[c.id]]"
>
[[
c
.
text
]]
<
/option
>
[[
/each]
]
<
/select
>
<
/div
>
[[
else
]]
<
span
>
[[
each
b
.
idNameList
as
c
index
]]
<
label
style
=
"cursor: pointer;"
><
input
name
=
"[[b.attributeId]]"
type
=
"[[b.inputType]]"
value
=
"[[c.id]]"
>
[[
c
.
text
]]
<
/label
>
[[
/each]
]
<
/span
>
<
input
id
=
"[[b.attributeId]]"
type
=
"hidden"
for
=
"[[b.inputType]]"
value
=
"[[b.selectedValues||'']]"
>
[[
/if]
]
<
/div
>
[[
/each]
]
[[
/if]
]
[[
/each]
]
<
div
id
=
"brandModelWrap"
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
品牌款型:
<
/div
>
<
div
class
=
"col-sm-2"
>
<
select
name
=
"brandModelSelect"
id
=
"brandModelSelect"
tabindex
=
"-1"
title
=
""
class
=
"form-control"
>
<
label
>
品牌款型:
<
/label
>
<
div
style
=
"display: inline-block;width: 280px;"
>
<
select
name
=
"brandModelSelect"
id
=
"brandModelSelect"
tabindex
=
"-1"
title
=
""
class
=
"form-control"
>
[[
if
brandModelText
]]
<
option
value
=
"[[brandModel]]"
>
[[
brandModelText
]]
<
/option
>
[[
else
]]
<
option
value
=
""
>
请选择品牌款型
<
/option
>
[[
/if]
]
<
/select
>
<
input
type
=
"hidden"
id
=
"brandModel"
value
=
"[[brandModel]]"
>
<
/div
>
<
input
type
=
"hidden"
id
=
"brandModel"
value
=
"[[brandModel]]"
>
<
/div
>
<
div
id
=
"brandSeriesWrap"
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
品牌系列:
<
/div
>
<
div
class
=
"col-sm-2"
>
<
label
>
品牌系列:
<
/label
>
<
div
style
=
"display: inline-block;width: 280px;"
>
<
select
name
=
"brandSeriesSelect"
id
=
"brandSeriesSelect"
tabindex
=
"-1"
title
=
""
class
=
"form-control"
>
[[
if
brandSeriesText
]]
<
option
value
=
"[[brandSeries]]"
>
[[
brandSeriesText
]]
<
/option>
...
...
@@ -73,55 +132,20 @@
<
option
value
=
""
>
请选择品牌系列
<
/option
>
[[
/if]]
<
/select
>
<
input
type
=
"hidden"
id
=
"brandSeries"
value
=
"[[brandSeries]]"
>
<
/div
>
<
/div
>
<
div
class
=
"making-process-wrap form-group"
>
<
div
class
=
"col-sm-1"
>
制作工艺:
<
/div
>
<
div
class
=
"col-sm-11"
>
[[
each
makingProcess
as
a
index
]]
[[
each
a
.
items
as
b
index
]]
<
label
style
=
"cursor: pointer;"
><
input
type
=
"checkbox"
name
=
"makeCrafts"
value
=
"[[b]]"
>
[[
b
]]
<
/label
>
[[
/each]
]
[[
/each]
]
<
input
id
=
"makeCrafts"
type
=
"hidden"
for
=
"checkbox"
value
=
"[[makeCrafts]]"
>
<
/div
>
<
/div
>
<
div
id
=
"wearSenseWrap"
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
舒适度:
<
/div
>
<
div
class
=
"col-sm-11"
>
[[
each
productComfort
as
a
index
]]
[[
if
index
==
"data"
]]
[[
each
a
as
b
index
]]
<
div
class
=
"col-sm-2"
>
<
label
>
[[
b
.
text
]]
<
/label
>
<
select
name
=
"[[b.id]]"
class
=
"form-control"
>
<
option
value
=
""
>
请选择
<
/option
>
<
option
value
=
"1"
>
1
<
/option
>
<
option
value
=
"2"
>
2
<
/option
>
<
option
value
=
"3"
>
3
<
/option
>
<
option
value
=
"4"
>
4
<
/option
>
<
option
value
=
"5"
>
5
<
/option
>
<
/select
>
<
input
type
=
"hidden"
value
=
"[[b.value]]"
>
<
/div
>
[[
/each]
]
[[
/if]
]
[[
/each]
]
<
/div
>
<
input
type
=
"hidden"
id
=
"brandSeries"
value
=
"[[brandSeries]]"
>
<
/div
>
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
促销短语:
<
/div
>
<
div
class
=
"col-sm-11"
>
<
input
id
=
"salesPhrase"
class
=
"form-control"
type
=
"text"
value
=
"[[salesPhrase]]"
>
<
/div
>
<
label
>
促销短语:
<
/label
>
<
input
id
=
"salesPhrase"
class
=
"form-control"
type
=
"text"
value
=
"[[salesPhrase]]"
style
=
"display: inline-block;width: 280px;"
>
<
/div
>
<
div
class
=
"form-group"
>
<
div
class
=
"col-sm-1"
>
是否促销:
<
/div
>
<
div
class
=
"col-sm-11"
>
<
label
>
是否促销:
<
/label
>
<
span
>
<
label
class
=
"radio-inline"
><
input
type
=
"radio"
name
=
"isHostsell"
value
=
"Y"
>
是
<
/label
>
<
label
class
=
"radio-inline"
><
input
type
=
"radio"
name
=
"isHostsell"
value
=
"N"
>
否
<
/label
>
<
input
id
=
"isHostsell"
type
=
"hidden"
for
=
"radio"
value
=
"[[isHostsell]]"
>
<
/
div
>
<
/
span
>
<
/div
>
</script>
\ No newline at end of file
...
...
server/views/partials/netsale/basic-info.html
View file @
8d9a2bd
...
...
@@ -137,7 +137,7 @@
<
div
class
=
"col-sm-12"
>
<
label
>
商品短评
<
i
class
=
"red"
>*<
/i>:</
label
>
[[
if
renderType
==
'edit'
]]
<
input
id
=
"p
roductName"
style
=
"display:inline-block;width: 280px;"
class
=
"form-control"
placeholder
=
"基础商品名称"
type
=
"text"
value
=
"[[productNam
e]]"
required
>
<
input
id
=
"p
hrase"
style
=
"display:inline-block;width: 280px;"
class
=
"form-control"
placeholder
=
"商品短评"
type
=
"text"
value
=
"[[phras
e]]"
required
>
[[
else
]]
<
span
>
[[
phrase
]]
<
/span
>
[[
/if]
]
...
...
server/views/partials/netsale/goods-params.html
View file @
8d9a2bd
...
...
@@ -6,20 +6,14 @@
</div>
<h2
class=
"panel-title"
>
商品参数
</h2>
</div>
<div
class=
"panel-body nopadding"
>
<div
class=
"form-group"
id=
"material-group"
>
</div>
<div
class=
"form-group"
id=
"washTip-group"
>
</div>
<div
id=
"goodsParamWrap"
class=
"panel-body nopadding"
>
</div>
<div
class=
"panel-footer"
>
<
button
class=
"btn btn-primary"
id=
"propertySave"
>
保存
</button
>
<
a
href=
"javascript:;"
class=
"btn btn-primary"
id=
"propertySave"
>
保存
</a
>
</div>
</div>
<script
type=
"text/template"
id=
"material-params"
>
<
!-- <
script type="text/template" id="material-params">
<label class="col-sm-2 control-label">材质</label>
<div class="col-sm-8 height40">
[[each data as item index]]
...
...
@@ -38,4 +32,18 @@
[[/each]]
</div>
<input type="hidden" id="washTips" value="{washTips}" for="checkbox">
</script> -->
<script
type=
"text/template"
id=
"goodsParamTemp"
>
[[
each
data
as
b
index
]]
<
div
class
=
"goods-param-group form-group"
>
<
label
>
[[
b
.
attributeName
]]
:
<
/label
>
<
span
>
[[
each
b
.
idNameList
as
c
index
]]
<
label
style
=
"cursor: pointer;"
><
input
name
=
"[[b.attributeId]]"
type
=
"[[b.inputType]]"
value
=
"[[c.id]]"
>
[[
c
.
text
]]
<
/label
>
[[
/each]
]
<
/span
>
<
input
id
=
"[[b.attributeId]]"
type
=
"hidden"
for
=
"[[b.inputType]]"
value
=
"[[b.selectedValues]]"
>
<
/div
>
[[
/each]
]
</script>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment