Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
farming
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
farming
Commits
f2aed4ee
Commit
f2aed4ee
authored
Jun 05, 2023
by
郑云飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地址修改
parent
41c619c8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
src/main/resources/templates/groupBuy/addOrEdit.html
+6
-13
No files found.
src/main/resources/templates/groupBuy/addOrEdit.html
View file @
f2aed4ee
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
</div>
</div>
</div>
</div>
<div
class=
"layui-card-body"
>
<div
class=
"layui-card-body"
>
<table
class=
"layui-table"
id=
"tableId"
lay-data=
"{id: 'tableId', toolbar: '#toolbarUtil', even: true, height: 'full-400', page: false, limit:
10
, cols: [[
<table
class=
"layui-table"
id=
"tableId"
lay-data=
"{id: 'tableId', toolbar: '#toolbarUtil', even: true, height: 'full-400', page: false, limit:
9999
, cols: [[
{field: 'id', title: '编码'},
{field: 'id', title: '编码'},
{field: 'sshortpic', title: '头图'},
{field: 'sshortpic', title: '头图'},
{field: 'sname', title: '名称'},
{field: 'sname', title: '名称'},
...
@@ -189,7 +189,6 @@
...
@@ -189,7 +189,6 @@
}
else
{
}
else
{
selectedValues
.
push
(
parseInt
(
data
.
value
));
selectedValues
.
push
(
parseInt
(
data
.
value
));
}
}
console
.
log
(
selectedValues
);
// 打印选中的值
});
});
});
});
...
@@ -234,18 +233,16 @@
...
@@ -234,18 +233,16 @@
$
(
function
()
{
$
(
function
()
{
if
(
id
)
{
if
(
id
)
{
console
.
log
(
"==========================="
,
'[[${obj}]]'
)
console
.
log
(
"==========================="
,
'[[${areaList}]]'
)
showPic
(
'[[${obj.groupBuyPic}]]'
);
showPic
(
'[[${obj.groupBuyPic}]]'
);
showTable
(
'[[${obj.productList}]]'
);
showTable
(
'[[${obj.productList}]]'
);
console
.
log
(
111111111
,
selectedData
)
renderTable
();
renderTable
();
}
}
});
});
window
.
addEventListener
(
'message'
,
function
(
event
)
{
window
.
addEventListener
(
'message'
,
function
(
event
)
{
console
.
log
(
event
);
selectedData
.
push
(...
event
.
data
);
selectedData
=
event
.
data
;
const
idSet
=
new
Set
(
selectedData
.
map
(
item
=>
item
.
id
));
selectedData
=
Array
.
from
(
idSet
).
map
(
id
=>
selectedData
.
find
(
item
=>
item
.
id
===
id
));
for
(
var
i
=
0
;
i
<
selectedData
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
selectedData
.
length
;
i
++
)
{
selectedData
[
i
].
productPrice
=
selectedData
[
i
].
productPrice
||
selectedData
[
i
].
dsaleprice
;
selectedData
[
i
].
productPrice
=
selectedData
[
i
].
productPrice
||
selectedData
[
i
].
dsaleprice
;
}
}
...
@@ -253,12 +250,13 @@
...
@@ -253,12 +250,13 @@
},
false
);
},
false
);
function
renderTable
()
{
function
renderTable
()
{
table
.
render
({
table
.
render
({
elem
:
'#tableId'
,
elem
:
'#tableId'
,
data
:
selectedData
,
data
:
selectedData
,
toolbar
:
'#toolbarUtil'
,
//开启头部工具栏,并为其绑定左侧模板
toolbar
:
'#toolbarUtil'
,
//开启头部工具栏,并为其绑定左侧模板
even
:
true
,
//隔行换色
even
:
true
,
//隔行换色
page
:
false
,
limit
:
9999
,
cols
:
[
cols
:
[
[
[
{
field
:
'id'
,
title
:
'编码'
},
{
field
:
'id'
,
title
:
'编码'
},
...
@@ -400,7 +398,6 @@
...
@@ -400,7 +398,6 @@
return
data
;
return
data
;
},
{})
},
{})
);
);
console
.
log
(
products
)
groupBuy
=
JSON
.
parse
(
groupBuy
)
groupBuy
=
JSON
.
parse
(
groupBuy
)
groupBuy
.
areaIdList
=
areaIdList
;
groupBuy
.
areaIdList
=
areaIdList
;
groupBuy
.
products
=
products
;
groupBuy
.
products
=
products
;
...
@@ -416,9 +413,7 @@
...
@@ -416,9 +413,7 @@
processData
:
false
,
processData
:
false
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
console
.
log
(
"sdffffffffffffffffff"
,
result
);
if
(
result
.
code
==
100
)
{
if
(
result
.
code
==
100
)
{
console
.
log
(
"sdffffffffffffffffff"
,
100
);
closeLayer
();
closeLayer
();
parent
.
layui
.
table
.
reload
(
'tableId'
);
parent
.
layui
.
table
.
reload
(
'tableId'
);
}
else
{
}
else
{
...
@@ -458,7 +453,6 @@
...
@@ -458,7 +453,6 @@
for
(
var
i
=
0
;
i
<
selectedData
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
selectedData
.
length
;
i
++
)
{
selectedData
[
i
].
productPrice
=
selectedData
[
i
].
productPrice
||
''
;
selectedData
[
i
].
productPrice
=
selectedData
[
i
].
productPrice
||
''
;
}
}
console
.
log
(
222222222
,
selectedData
)
}
}
layui
.
use
(
'form'
,
function
()
{
layui
.
use
(
'form'
,
function
()
{
...
@@ -468,7 +462,6 @@
...
@@ -468,7 +462,6 @@
function
closeLayer
()
{
function
closeLayer
()
{
console
.
log
(
"sdffffffffffffffffff"
);
//关闭当前frame
//关闭当前frame
parent
.
layer
.
close
(
parent
.
layer
.
getFrameIndex
(
window
.
name
));
parent
.
layer
.
close
(
parent
.
layer
.
getFrameIndex
(
window
.
name
));
}
}
...
...
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