Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9387cf79
authored
May 31, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
sku展示成本价
parent
eb2fbd16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
3 deletions
resources/views/script/SkuListScript.blade.php
resources/views/web/SkuList.blade.php
resources/views/script/SkuListScript.blade.php
View file @
9387cf79
...
@@ -73,11 +73,25 @@
...
@@ -73,11 +73,25 @@
},
},
{
field
:
'stock'
,
title
:
'库存数量'
,
align
:
'center'
,
width
:
80
},
{
field
:
'stock'
,
title
:
'库存数量'
,
align
:
'center'
,
width
:
80
},
{
{
field
:
'cn_price'
,
title
:
'RMB成本价(含税)'
,
align
:
'center'
,
width
:
120
field
:
'cn_price'
,
title
:
'国内含币价(¥)'
,
align
:
'left'
,
width
:
150
,
templet
:
function
(
data
)
{
if
(
data
.
ladder_price
)
{
let
ladder
=
data
.
ladder_price
[
data
.
ladder_price
.
length
-
1
];
return
'
<
div
class
=
"view_ladder_price_cn layui-row"
><
div
class
=
"layui-col-xs5"
><
span
>
'+ (ladder.purchases) + '
+<
/span></
div
><
div
class
=
"layui-col-xs7"
><
span
>
¥
' + (ladder.price_cn) + '
<
/span></
div
><
/div>'
;
}
return
''
;
}
},
},
{
field
:
'us_price'
,
title
:
'USD成本价(未税)'
,
align
:
'center'
,
width
:
120
},
{
{
field
:
'moq'
,
title
:
'起订量'
,
align
:
'center'
,
width
:
70
field
:
'us_price'
,
title
:
'USD成本价(未税)'
,
align
:
'left'
,
width
:
150
,
templet
:
function
(
data
)
{
if
(
data
.
ladder_price
)
{
let
ladder
=
data
.
ladder_price
[
data
.
ladder_price
.
length
-
1
];
if
(
ladder
.
price_us
)
{
return
'
<
div
class
=
"view_ladder_price_us layui-row"
"
><
div
class
=
"layui-col-xs5"
><
span
>
'+ (ladder.purchases) + '
+<
/span></
div
><
div
class
=
"layui-col-xs7"
><
span
>
$
' + (ladder.price_us) + '
<
/span></
div
><
/div>'
;
}
}
return
''
;
}
},
},
{
field
:
'mpq'
,
title
:
'标准包装量'
,
align
:
'center'
,
width
:
120
},
{
field
:
'mpq'
,
title
:
'标准包装量'
,
align
:
'center'
,
width
:
120
},
{
{
...
@@ -428,5 +442,76 @@
...
@@ -428,5 +442,76 @@
});
});
});
});
//划过显示成本价格
let
ladderPriceTipsVal
=
''
;
$
(
document
).
on
(
'mouseenter'
,
'.view_ladder_price_cn'
,
function
()
{
let
self
=
this
;
let
rowIndex
=
$
(
this
).
parent
().
parent
().
parent
().
attr
(
'data-index'
);
let
data
=
table
.
cache
[
'skuList'
][
rowIndex
].
ladder_price
;
console
.
log
(
data
)
if
(
!
data
)
{
return
false
;
}
let
htmlArr
=
[];
let
color
=
'green'
;
if
(
data
.
length
>
0
)
{
htmlArr
.
push
(
'
<
table
class
=
"layui-table table-status"
><
thead
>
' +
'
<
tr
><
th
style
=
"text-align: center"
>
数量
<
/th>'
+
'
<
th
style
=
"text-align: center"
>
国内含币价
(
¥
)
<
/th>'
+
'
<
/tr></
thead
><
tbody
>
'
)
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
htmlArr
.
push
(
'
<
tr
>
' +
'
<
td
style
=
"text-align: center"
>
' + data[i].purchases + '
+<
/td>'
+
'
<
td
style
=
"text-align: center"
>
' + (data[i].price_cn ? data[i].price_cn : '') + '
<
/td>'
+
'
<
/tr>'
)
;
}
htmlArr
.
push
(
'
<
/tbody></
table
>
')
ladderPriceTipsVal = layer.tips(htmlArr.join(''), self, {
tips: [3, "#009688"],
time: 1000000,
area: ['
250
px
', '
auto
'],
skin: '
custom
'
});
}
}).on('
mouseleave
', '
.
view_ladder_price_cn
', function () {
layer.close(ladderPriceTipsVal);
});
let ladderPriceTipsValUs = '';
$(document).on('
mouseenter
', '
.
view_ladder_price_us
', function () {
let self = this;
let rowIndex = $(this).parent().parent().parent().attr('
data
-
index
');
let data = table.cache['
skuList
'][rowIndex].ladder_price;
console.log(data)
if (!data) {
return false;
}
let htmlArr = [];
let color = '
green
';
if (data.length > 0) {
htmlArr.push('
<
table
class
=
"layui-table table-status"
><
thead
>
' +
'
<
tr
><
th
style
=
"text-align: center"
>
数量
<
/th>'
+
'
<
th
style
=
"text-align: center"
>
USD
成本价(未税)
<
/th>'
+
'
<
/tr></
thead
><
tbody
>
'
)
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
htmlArr
.
push
(
'
<
tr
>
' +
'
<
td
style
=
"text-align: center"
>
' + data[i].purchases + '
+<
/td>'
+
'
<
td
style
=
"text-align: center"
>
' + (data[i].price_us ? data[i].price_us : '') + '
<
/td>'
+
'
<
/tr>'
)
;
}
htmlArr
.
push
(
'
<
/tbody></
table
>
')
ladderPriceTipsValUs = layer.tips(htmlArr.join(''), self, {
tips: [3, "#009688"],
time: 1000000,
area: ['
250
px
', '
auto
'],
skin: '
custom
'
});
}
}).on('
mouseleave
', '
.
view_ladder_price_us
'
,
function
()
{
layer
.
close
(
ladderPriceTipsValUs
);
});
});
});
</script>
</script>
\ No newline at end of file
resources/views/web/SkuList.blade.php
View file @
9387cf79
@
include
(
'web.sku.SkuListCommon'
)
@
include
(
'web.sku.SkuListCommon'
)
<
style
>
.
custom
.
layui
-
layer
-
content
.
table
-
status
{
position
:
relative
;
margin
:
0
!
important
;
z
-
index
:
2
;
}
.
custom
.
layui
-
layer
-
content
.
table
-
status
th
{
white
-
space
:
nowrap
;
}
.
layui
-
layer
-
content
{
padding
:
3
px
3
px
!
important
;
}
.
custom
.
layui
-
layer
-
content
.
table
-
status
td
,
.
custom
.
layui
-
layer
-
content
.
table
-
status
th
{
padding
:
3
px
3
px
!
important
;
}
</
style
>
<
div
style
=
"margin-left: 20px;margin-right: 20px"
>
<
div
style
=
"margin-left: 20px;margin-right: 20px"
>
<
div
class
="
layui
-
btn
-
group
demoTable
" style="
margin
-
top
:
15
px
">
<
div
class
="
layui
-
btn
-
group
demoTable
" style="
margin
-
top
:
15
px
">
@if(checkPerm('TempTemp'))
@if(checkPerm('TempTemp'))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment