Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
04d91d81
Commit
04d91d81
authored
Dec 07, 2023
by
覃振观
👶
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
23-12-7: Class panel
parent
1e7f4f57
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
57 deletions
+105
-57
product.js
topsun-xt/src/main/webapp/biz/topsun/product/product.js
+7
-6
productDetail.js
...un-xt/src/main/webapp/biz/topsun/product/productDetail.js
+52
-29
productDetail.jsp
...n-xt/src/main/webapp/biz/topsun/product/productDetail.jsp
+33
-12
ProductApplicationImpl.java
...psun/product/application/impl/ProductApplicationImpl.java
+9
-7
ProductController.java
...m/huigou/topsun/product/controller/ProductController.java
+0
-1
ProductFaceColorRepository.java
...topsun/product/repository/ProductFaceColorRepository.java
+4
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/product/product.js
View file @
04d91d81
...
@@ -31,16 +31,12 @@ function loadCodeRuleListGrid() {
...
@@ -31,16 +31,12 @@ function loadCodeRuleListGrid() {
{
display
:
"品牌名称"
,
name
:
"brandName"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"品牌名称"
,
name
:
"brandName"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"产品类型"
,
name
:
"prodcutType"
,
width
:
140
,
minWidth
:
60
,
type
:
"datetime"
,
align
:
"left"
}
{
display
:
"产品类型"
,
name
:
"prodcutType"
,
width
:
140
,
minWidth
:
60
,
type
:
"datetime"
,
align
:
"left"
}
],
],
data
Action
:
"server"
,
data
Type
:
"server"
,
url
:
web_app
.
name
+
'/product/findProduct.ajax'
,
url
:
web_app
.
name
+
'/product/findProduct.ajax'
,
parms
:
{
page
:
0
,
size
:
30
},
pageSize
:
20
,
pageSize
:
20
,
usePager
:
true
,
usePager
:
true
,
toolbar
:
toolbarOptions
,
toolbar
:
toolbarOptions
,
width
:
"
10
0%"
,
width
:
"
5
0%"
,
height
:
"100%"
,
height
:
"100%"
,
heightDiff
:
-
8
,
heightDiff
:
-
8
,
checkbox
:
true
,
checkbox
:
true
,
...
@@ -53,6 +49,11 @@ function loadCodeRuleListGrid() {
...
@@ -53,6 +49,11 @@ function loadCodeRuleListGrid() {
UICtrl
.
setSearchAreaToggle
(
gridManager
);
UICtrl
.
setSearchAreaToggle
(
gridManager
);
}
}
// parms: {
// page: 0,
// size: 30
// },
function
updateHandler
(
data
)
{
function
updateHandler
(
data
)
{
var
id
=
data
.
productId
;
var
id
=
data
.
productId
;
if
(
!
id
)
{
if
(
!
id
)
{
...
...
topsun-xt/src/main/webapp/biz/topsun/product/productDetail.js
View file @
04d91d81
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
initializeUI
();
initializeToobarContainer
();
$
(
'#pageTab'
).
tab
();
$
(
'#pageTab'
).
tab
();
initializateSelectC
();
initializateSelectC
();
loadDataTest
();
loadDataTest
();
...
@@ -14,6 +16,16 @@ function initializateSelectC() {
...
@@ -14,6 +16,16 @@ function initializateSelectC() {
});
});
}
}
function
initializeUI
()
{
UICtrl
.
layout
(
"#layout"
,{
leftWidth
:
6
,
rightWidth
:
6
,
allowRightCollapse
:
false
,
allowRightResize
:
false
});
}
function
loadDataTest
()
{
function
loadDataTest
()
{
console
.
log
(
"loadData"
)
console
.
log
(
"loadData"
)
var
params
=
new
URLSearchParams
(
document
.
location
.
search
);
var
params
=
new
URLSearchParams
(
document
.
location
.
search
);
...
@@ -21,25 +33,12 @@ function loadDataTest() {
...
@@ -21,25 +33,12 @@ function loadDataTest() {
Public
.
ajax
(
web_app
.
name
+
"/product/loadProductDetail.ajax"
,
{
Public
.
ajax
(
web_app
.
name
+
"/product/loadProductDetail.ajax"
,
{
productId
:
paramsData
.
productId
productId
:
paramsData
.
productId
},
function
(
data
)
{
},
function
(
data
)
{
debugger
;
$
(
'#submitForm'
).
formSet
(
data
);
$
(
'#submitForm'
).
formSet
(
data
);
var
fronData
=
{};
var
fronData
=
{};
fronData
.
Rows
=
data
.
fronColor
;
fronData
.
Rows
=
data
.
fronColors
;
faceGrid
(
"#frontFaceDiv"
,
fronData
);
faceGrid
(
"#frontFaceGrid"
,
fronData
);
fronData
.
Rows
=
data
.
backColor
;
fronData
.
Rows
=
data
.
backColors
;
faceGrid
(
"#backFaceDiv"
,
fronData
);
faceGrid
(
"#backFaceGrid"
,
fronData
);
// var selectedCategory = data.selectedCategory;
// $("#selectedCategory").ligerComboBox({
// textField: 'productCategoryName',
// valueField: 'productCategoryId',
// columns: [
// { header: 'ID', name: 'productCategoryId', width: 20 },
// { header: '名字', name: 'productCategoryName' }
// ],
// data: selectedCategory,
// selectBoxWidth: 200
// });
});
});
}
}
...
@@ -47,29 +46,53 @@ function faceGrid(elId, data) {
...
@@ -47,29 +46,53 @@ function faceGrid(elId, data) {
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
updateHandler
:
function
(){
updateHandler
:
function
(){
updateHandler
();
updateHandler
();
},
aaHandler
:
{
id
:
'ccAA'
,
text
:
'Hello'
,
img
:
'fa-music'
,
className
:
'btn-gray'
,
click
:
function
()
{
alert
(
'hello~!'
);
}
}
}
});
});
gridManager
=
UICtrl
.
grid
(
elId
,
{
debugger
;
var
gridManager
=
UICtrl
.
grid
(
elId
,
{
columns
:
[
columns
:
[
{
display
:
"颜色名称"
,
name
:
"productFaceColorId"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"颜色名称"
,
name
:
"productFaceColorId"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"油墨覆盖率(%)"
,
name
:
"coverageRate"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
{
display
:
"油墨覆盖率(%)"
,
name
:
"coverageRate"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
],
],
toolbar
:
toolbarOptions
,
toolbar
:
toolbarOptions
,
dataAction
:
"local"
,
dataType
:
"local"
,
dataType
:
"local"
,
data
:
data
,
// data 数据结构 data: ("Rows": [ {}, {} ])
data
:
data
,
// data 数据结构 data: ("Rows": [ {}, {} ])
checkbox
:
true
,
usePager
:
false
,
usePager
:
true
,
pageSize
:
20
,
width
:
"100%"
,
width
:
"100%"
,
height
:
420
,
height
:
150
,
enabledSort
:
false
,
autoAddRowByKeydown
:
false
,
heightDiff
:
-
10
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
updateHandler
(
data
);
updateHandler
(
data
);
}
}
});
});
}
}
\ No newline at end of file
function
initializeToobarContainer
(){
$
(
'#toolBarCenter'
).
attr
(
'position'
,
'bottom'
);
//dropup==true 更多按钮向上展示
$
(
'#toolBar'
).
data
(
'dropup'
,
true
).
removeClass
(
'job-button-fixed-top'
).
addClass
(
'job-button-fixed-bottom'
);
UICtrl
.
layout
(
$
(
"#jobPageLayout"
),
{
heightDiff
:
-
2
,
topHeight
:
40
,
bottomHeight
:
40
,
onSizeChanged
:
function
(){
}});
}
// checkbox: true,
// enabledSort: false,
// autoAddRowByKeydown:false,
// heightDiff: -10,
// fixedCellHeight: true,
// selectRowButtonOnly: true,
// var selectedCategory = data.selectedCategory;
// $("#selectedCategory").ligerComboBox({
// textField: 'productCategoryName',
// valueField: 'productCategoryId',
// columns: [
// { header: 'ID', name: 'productCategoryId', width: 20 },
// { header: '名字', name: 'productCategoryName' }
// ],
// data: selectedCategory,
// selectBoxWidth: 200
// });
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/product/productDetail.jsp
View file @
04d91d81
...
@@ -16,15 +16,17 @@
...
@@ -16,15 +16,17 @@
<x:script
src=
'/biz/topsun/product/productDetail.js'
/>
<x:script
src=
'/biz/topsun/product/productDetail.js'
/>
</head>
</head>
<body>
<body>
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
style=
"position: relative; display: inline-flex; flex-direction: column; height: 97%;
background-color: #f3f3f4 !important;"
>
<%-- style="position: relative; display: inline-flex; flex-direction: column;"--%>
<%-- <x:hidden name="productDetailId" />--%>
<%-- <x:hidden name="productId"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div labelCol="15"> </div>--%>
<%-- </div>--%>
<%-- style="overflow: 98vh;"--%>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"productDetailId"
/>
<x:hidden
name=
"productId"
/>
<div
class=
"hg-form-cols"
>
<div
labelCol=
"15"
>
</div>
</div>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:title
title=
"基本属性"
name=
"group"
hideTable=
"#info"
/>
<x:title
title=
"基本属性"
name=
"group"
hideTable=
"#info"
/>
<x:inputC
name=
"productId"
required=
"true"
label=
"产品编码"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"productId"
required=
"true"
label=
"产品编码"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
...
@@ -56,17 +58,36 @@
...
@@ -56,17 +58,36 @@
<x:title
title=
"排版参数"
name=
"group"
hideTable=
"#info"
/>
<x:title
title=
"排版参数"
name=
"group"
hideTable=
"#info"
/>
<x:inputC
name=
"modulus"
required=
"true"
label=
"模数"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"modulus"
required=
"true"
label=
"模数"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"row_num"
required=
"true"
label=
"行数"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<x:inputC
name=
"row_num"
required=
"true"
label=
"行数"
labelCol=
"2"
maxLength=
"64"
fieldCol=
"4"
/>
<div
id=
"frontFaceGrid"
style=
"margin: 2px;"
></div>
<div
id=
"frontFaceGrid"
style=
"margin: 2px;"
></div>
<div
id=
"layout"
style=
"height: 280px; display: contents;"
>
<div
position=
"left"
title=
"正面颜色"
>
<div
id=
"frontFaceGrid"
style=
"margin: 2px;"
></div>
</div>
<div
position=
"right"
title=
"反面颜色"
>
<div
id=
"backFaceGrid"
style=
"margin: 2px;"
></div>
</div>
</div>
<x:title
title=
"产品材质"
name=
"group"
hideTable=
"#info"
/>
</div>
</div>
<div
class=
"layout"
id=
'
frontFace
Div'
>
<div
class=
"layout"
id=
'
lossForm
Div'
>
</div>
</div>
<div
class=
"layout"
id=
'backFace
Div'
>
<div
class=
"layout"
id=
'materialList
Div'
>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</form>
<div
id=
"toolBarCenter"
class=
"footer"
style=
"background: none repeat scroll 0 0 #fff; border-top: 1px solid #e7eaec;
position: absolute; bottom: 0; width: 100%; display:flex; justify-content:center;"
>
<%-- style=""--%>
<div
id=
'toolBar'
checkAccess=
"false"
>
<a>
aaa
</a>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
...
...
topsun/src/main/java/com/huigou/topsun/product/application/impl/ProductApplicationImpl.java
View file @
04d91d81
...
@@ -98,21 +98,23 @@ public class ProductApplicationImpl implements ProductApplication {
...
@@ -98,21 +98,23 @@ public class ProductApplicationImpl implements ProductApplication {
if
(
productDetail
!=
null
)
{
if
(
productDetail
!=
null
)
{
if
(
productDetail
.
getBackProductFaceId
()
!=
null
)
{
if
(
productDetail
.
getBackProductFaceId
()
!=
null
)
{
ProductFace
frontFace
=
faceRepository
.
findByProductFaceIdEquals
(
productDetail
.
getBackProductFaceId
());
ProductFace
frontFace
=
faceRepository
.
findByProductFaceIdEquals
(
productDetail
.
getBackProductFaceId
());
ProductFaceColor
fronColor
=
faceColorRepository
.
findByProductFaceIdEquals
(
productDetail
.
getBackProductFaceId
());
ArrayList
<
ProductFaceColor
>
fronColors
=
(
ArrayList
<
ProductFaceColor
>)
faceColorRepository
.
findByProductFaceId
(
productDetail
.
getBackProductFaceId
());
resultMap
.
put
(
"frontFace"
,
frontFace
);
resultMap
.
put
(
"frontFace"
,
frontFace
);
resultMap
.
put
(
"fronColor
"
,
fronColor
==
null
?
new
ProductFaceColor
()
:
fronColor
);
resultMap
.
put
(
"fronColor
s"
,
fronColors
==
null
?
new
ArrayList
<>()
:
fronColors
);
}
else
{
}
else
{
ProductFaceColor
fc
=
new
ProductFaceColor
();
ProductFaceColor
fc
=
new
ProductFaceColor
();
fc
.
setProductFaceColorId
(
"111"
);
fc
.
setProductFaceColorId
(
"111"
);
resultMap
.
put
(
"fronColor"
,
fc
);
ArrayList
fronColors
=
new
ArrayList
<>();
fronColors
.
add
(
fc
);
resultMap
.
put
(
"fronColors"
,
fronColors
);
}
}
if
(
productDetail
.
getBackProductFaceId
()
!=
null
)
{
if
(
productDetail
.
getBackProductFaceId
()
!=
null
)
{
ProductFace
backFace
=
faceRepository
.
findByProductFaceIdEquals
(
productDetail
.
getBackProductFaceId
());
ProductFace
backFace
=
faceRepository
.
findByProductFaceIdEquals
(
productDetail
.
getBackProductFaceId
());
ProductFaceColor
backColor
=
faceColorRepository
.
findByProductFaceIdEquals
(
productDetail
.
getBackProductFaceId
());
ArrayList
<
ProductFaceColor
>
backColors
=
(
ArrayList
<
ProductFaceColor
>)
faceColorRepository
.
findByProductFaceId
(
productDetail
.
getBackProductFaceId
());
resultMap
.
put
(
"backFace"
,
backFace
);
resultMap
.
put
(
"backFace"
,
backFace
);
resultMap
.
put
(
"backColor"
,
backColor
==
null
?
new
ProductFaceColor
()
:
backColor
);
resultMap
.
put
(
"backColors"
,
backColors
==
null
?
new
ArrayList
<>()
:
backColors
);
}
else
{
resultMap
.
put
(
"backColor"
,
new
ProductFaceColor
());
}
}
}
}
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectMapper
mapper
=
new
ObjectMapper
();
...
...
topsun/src/main/java/com/huigou/topsun/product/controller/ProductController.java
View file @
04d91d81
...
@@ -57,7 +57,6 @@ public class ProductController extends CommonController {
...
@@ -57,7 +57,6 @@ public class ProductController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
productId
=
sdo
.
getString
(
"id"
);
String
productId
=
sdo
.
getString
(
"id"
);
Map
<
String
,
Object
>
map
=
productService
.
queryDetailAll
(
Integer
.
parseInt
(
productId
));
Map
<
String
,
Object
>
map
=
productService
.
queryDetailAll
(
Integer
.
parseInt
(
productId
));
return
toResult
(
map
);
return
toResult
(
map
);
}
}
...
...
topsun/src/main/java/com/huigou/topsun/product/repository/ProductFaceColorRepository.java
View file @
04d91d81
...
@@ -3,11 +3,13 @@ package com.huigou.topsun.product.repository;
...
@@ -3,11 +3,13 @@ package com.huigou.topsun.product.repository;
import
com.huigou.topsun.product.domain.ProductFaceColor
;
import
com.huigou.topsun.product.domain.ProductFaceColor
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
/**
* @
Auther:
xin.lu
* @
author
xin.lu
* @Date: 2023/11/22/10:41
* @Date: 2023/11/22/10:41
* @Description:
* @Description:
*/
*/
public
interface
ProductFaceColorRepository
extends
JpaRepository
<
ProductFaceColor
,
String
>
{
public
interface
ProductFaceColorRepository
extends
JpaRepository
<
ProductFaceColor
,
String
>
{
ProductFaceColor
findByProductFaceIdEquals
(
String
productFaceId
);
List
<
ProductFaceColor
>
findByProductFaceId
(
String
productFaceId
);
}
}
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