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
Email Patches
Plain Diff
Browse Files
Authored by
姜敏
9 years ago
Commit
3948f8a4e818e1dab8ee3918aab554991b56adb8
1 parent
0f946c3d
尺码测量bug
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
6 deletions
client/js/meterManage/addSizeInfo.js
client/js/meterManage/meterSize.js
client/js/sourceManage/partials/Validate1.js
server/interface/meterSize.js
client/js/meterManage/addSizeInfo.js
View file @
3948f8a
...
...
@@ -36,19 +36,18 @@ $(document).on('click', '#searchSku', function () {
var
refName
=
item1
.
referenceName
?
item1
.
referenceName
:
""
;
//非空判断
var
a
=
refName
.
split
(
/
[
|
/]
/g
);
var
refName1
=
a
[
0
]
||
""
,
refName2
=
a
[
1
]
||
""
;
return
'<input class="col-sm-
2 refInfo refInfo1" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName1
+
'"/>'
+
'<div class="col-sm-1">'
+
'/</div>'
+
'<input class="col-sm-2
refInfo refInfo2" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName2
+
'"/>'
;
return
'<input class="col-sm-
5 refInfo refInfo1" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName1
+
'"/>'
+
'<div class="col-sm-1">'
+
'/</div>'
+
'<input class="col-sm-5
refInfo refInfo2" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName2
+
'"/>'
;
}
});
for
(
var
i
=
0
;
i
<
dataList
.
sizeRelationsList
[
0
].
prdSizeAttributeBoList
.
length
;
i
++
)
{
//尺码列
var
sizeAttributes
=
dataList
.
sizeRelationsList
[
0
].
prdSizeAttributeBoList
[
i
];
//参考尺码数组里的数据
var
chkbox
=
'<label style="cursor: pointer;"><input type="checkbox" name="noMeasureIds" data-index="'
+
i
+
'" value="'
+
sizeAttributes
.
sizeAttributeId
+
'"/>无需测量</label>'
;
console
.
log
(
"chkbox"
,
chkbox
);
headList
.
push
({
display
:
sizeAttributes
.
sizeAttributeName
+
"<br>"
+
chkbox
,
name
:
"sizeValue"
,
render
:
function
(
item1
)
{
var
prdList
=
item1
.
prdSizeAttributeBoList
;
if
(
j
=
=
prdList
.
length
)
j
=
0
;
//防止越界
if
(
j
>
=
prdList
.
length
)
j
=
0
;
//防止越界
var
sizeVal
=
prdList
[
j
].
sizeValue
?
prdList
[
j
].
sizeValue
:
""
;
return
'<input class="form-control sizeInfo '
+
prdList
[
j
++
].
sizeAttributeId
+
'" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
sizeVal
+
'"/>'
;
...
...
client/js/meterManage/meterSize.js
View file @
3948f8a
...
...
@@ -51,6 +51,7 @@ var g = new common.grid({
display
:
"尺码"
,
name
:
"sizeRelationsList"
,
render
:
function
(
item1
)
{
console
.
log
(
"item1"
,
item1
);
return
common
.
util
.
__template2
(
$
(
"#sizeinfo-template"
).
html
(),
item1
);
}
},
...
...
@@ -163,7 +164,7 @@ var Bll = {
sizeInfoList
:
JSON
.
stringify
(
sizeInfoList
),
productSizeReferList
:
JSON
.
stringify
(
productSizeReferList
)
};
console
.
log
(
"最终数据data"
,
data
);
//
console.log("最终数据data", data);
common
.
util
.
__ajax
({
url
:
url
,
data
:
data
...
...
@@ -194,7 +195,7 @@ var Bll = {
var
refName
=
item1
.
referenceName
?
item1
.
referenceName
:
""
;
//非空判断
var
a
=
refName
.
split
(
/
[
,|
/]
/g
);
var
refName1
=
a
[
0
]
||
""
,
refName2
=
a
[
1
]
||
""
;
return
'<input class="col-sm-
2 refInfo refInfo1" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName1
+
'"/>'
+
'<div class="col-sm-1">'
+
'/</div>'
+
'<input class="col-sm-2
refInfo refInfo2" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName2
+
'"/>'
;
return
'<input class="col-sm-
5 refInfo refInfo1" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName1
+
'"/>'
+
'<div class="col-sm-1">'
+
'/</div>'
+
'<input class="col-sm-5
refInfo refInfo2" data-index="'
+
item1
.
__index
+
'"'
+
'value="'
+
refName2
+
'"/>'
;
}
});
for
(
var
i
=
0
;
i
<
item
.
sizeRelationsList
[
0
].
prdSizeAttributeBoList
.
length
;
i
++
)
{
//尺码列
...
...
@@ -205,7 +206,7 @@ var Bll = {
name
:
"sizeValue"
,
render
:
function
(
item1
)
{
var
prdList
=
item1
.
prdSizeAttributeBoList
;
if
(
j
=
=
prdList
.
length
)
j
=
0
;
//防止越界
if
(
j
>
=
prdList
.
length
)
j
=
0
;
//防止越界
var
sizeVal
=
prdList
[
j
].
sizeValue
?
prdList
[
j
].
sizeValue
:
""
;
//j++;//
return
'<input class="form-control sizeInfo '
+
prdList
[
j
++
].
sizeAttributeId
...
...
client/js/sourceManage/partials/Validate1.js
0 → 100644
View file @
3948f8a
/**
* Created by JiangMin on 2016/4/18.
*/
var
common
=
require
(
'../../common/common'
);
var
Validate1
=
{
"getCoupon"
:
[
{
name
:
"couponID"
,
fn
:
function
(
data
)
{
var
a
=
""
;
var
b
=
false
;
data
.
data
.
forEach
(
function
(
x
)
{
if
(
x
.
couponID
)
{
if
(
a
==
""
)
{
a
=
x
.
couponID
;
}
else
{
a
=
a
+
','
+
x
.
couponID
;
}
}
});
common
.
util
.
__ajax
({
url
:
"/coupon/batchCheckCoupons"
,
async
:
false
,
data
:
{
params
:
a
}
},
function
(
res
)
{
if
(
res
.
code
==
'200'
){
b
=
true
;
}
});
return
b
;
}
}
]
};
module
.
exports
=
Validate1
;
\ No newline at end of file
...
...
server/interface/meterSize.js
View file @
3948f8a
...
...
@@ -3,6 +3,7 @@
* 测量尺码管理
*/
exports
.
domain
=
require
(
'../config/common.js'
).
domain
;
//exports.domain ="http://172.16.6.189:8088/platform";
exports
.
res
=
[
...
...
Please
register
or
login
to post a comment