Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
d344771c
"src/main/webapp/vscode:/vscode.git/clone" did not exist on "f7238732dcf7ae0831c2b18d3fd672d97bdcfc4c"
Commit
d344771c
authored
Jun 03, 2020
by
季圣华
Browse files
优化商品模块
parent
023c065e
Changes
11
Hide whitespace changes
Inline
Side-by-side
docs/jsh_erp.sql
View file @
d344771c
...
@@ -296,7 +296,7 @@ CREATE TABLE `jsh_depotitem` (
...
@@ -296,7 +296,7 @@ CREATE TABLE `jsh_depotitem` (
`TaxRate`
decimal
(
24
,
6
)
DEFAULT
NULL
COMMENT
'税率'
,
`TaxRate`
decimal
(
24
,
6
)
DEFAULT
NULL
COMMENT
'税率'
,
`TaxMoney`
decimal
(
24
,
6
)
DEFAULT
NULL
COMMENT
'税额'
,
`TaxMoney`
decimal
(
24
,
6
)
DEFAULT
NULL
COMMENT
'税额'
,
`TaxLastMoney`
decimal
(
24
,
6
)
DEFAULT
NULL
COMMENT
'价税合计'
,
`TaxLastMoney`
decimal
(
24
,
6
)
DEFAULT
NULL
COMMENT
'价税合计'
,
`OtherField1`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段1-
品
名'
,
`OtherField1`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段1-名
称
'
,
`OtherField2`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段2-型号'
,
`OtherField2`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段2-型号'
,
`OtherField3`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段3-制造商'
,
`OtherField3`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段3-制造商'
,
`OtherField4`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段4'
,
`OtherField4`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'自定义字段4'
,
...
@@ -715,7 +715,7 @@ INSERT INTO `jsh_material_extend` VALUES ('2', '568', '1001', '个', '11.000000'
...
@@ -715,7 +715,7 @@ INSERT INTO `jsh_material_extend` VALUES ('2', '568', '1001', '个', '11.000000'
INSERT
INTO
`jsh_material_extend`
VALUES
(
'3'
,
'569'
,
'1002'
,
'只'
,
'10.000000'
,
'15.000000'
,
'15.000000'
,
'13.000000'
,
'1'
,
'2020-02-20 23:45:15'
,
'jsh'
,
'jsh'
,
'1582213514731'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'3'
,
'569'
,
'1002'
,
'只'
,
'10.000000'
,
'15.000000'
,
'15.000000'
,
'13.000000'
,
'1'
,
'2020-02-20 23:45:15'
,
'jsh'
,
'jsh'
,
'1582213514731'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'4'
,
'570'
,
'1003'
,
'个'
,
'8.000000'
,
'15.000000'
,
'14.000000'
,
'13.000000'
,
'1'
,
'2020-02-20 23:45:37'
,
'jsh'
,
'jsh'
,
'1587657604430'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'4'
,
'570'
,
'1003'
,
'个'
,
'8.000000'
,
'15.000000'
,
'14.000000'
,
'13.000000'
,
'1'
,
'2020-02-20 23:45:37'
,
'jsh'
,
'jsh'
,
'1587657604430'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'5'
,
'577'
,
'1004'
,
'个'
,
'10.000000'
,
'20.000000'
,
'20.000000'
,
'20.000000'
,
'1'
,
'2020-02-20 23:46:36'
,
'jsh'
,
'jsh'
,
'1582213596494'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'5'
,
'577'
,
'1004'
,
'个'
,
'10.000000'
,
'20.000000'
,
'20.000000'
,
'20.000000'
,
'1'
,
'2020-02-20 23:46:36'
,
'jsh'
,
'jsh'
,
'1582213596494'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'6'
,
'577'
,
'1005'
,
'箱'
,
'120.000000'
,
'240.000000'
,
'240.000000'
,
'240.000000'
,
'
1
'
,
'2020-02-20 23:46:36'
,
'jsh'
,
'jsh'
,
'1582213596497'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'6'
,
'577'
,
'1005'
,
'箱'
,
'120.000000'
,
'240.000000'
,
'240.000000'
,
'240.000000'
,
'
0
'
,
'2020-02-20 23:46:36'
,
'jsh'
,
'jsh'
,
'1582213596497'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'7'
,
'579'
,
'1006'
,
'个'
,
'20.000000'
,
'30.000000'
,
'30.000000'
,
'30.000000'
,
'1'
,
'2020-02-20 23:47:04'
,
'jsh'
,
'jsh'
,
'1587784928581'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'7'
,
'579'
,
'1006'
,
'个'
,
'20.000000'
,
'30.000000'
,
'30.000000'
,
'30.000000'
,
'1'
,
'2020-02-20 23:47:04'
,
'jsh'
,
'jsh'
,
'1587784928581'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'8'
,
'579'
,
'1007'
,
'箱'
,
'240.000000'
,
'360.000000'
,
'360.000000'
,
'360.000000'
,
'0'
,
'2020-02-20 23:47:04'
,
'jsh'
,
'jsh'
,
'1587784928585'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'8'
,
'579'
,
'1007'
,
'箱'
,
'240.000000'
,
'360.000000'
,
'360.000000'
,
'360.000000'
,
'0'
,
'2020-02-20 23:47:04'
,
'jsh'
,
'jsh'
,
'1587784928585'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'9'
,
'586'
,
'1008'
,
'个'
,
'12.000000'
,
'15.000000'
,
'15.000000'
,
'15.000000'
,
'1'
,
'2020-02-20 23:47:23'
,
'jsh'
,
'jsh'
,
'1582213643084'
,
'63'
,
'0'
);
INSERT
INTO
`jsh_material_extend`
VALUES
(
'9'
,
'586'
,
'1008'
,
'个'
,
'12.000000'
,
'15.000000'
,
'15.000000'
,
'15.000000'
,
'1'
,
'2020-02-20 23:47:23'
,
'jsh'
,
'jsh'
,
'1582213643084'
,
'63'
,
'0'
);
...
...
erp_web/js/pages/materials/bill_detail.js
View file @
d344771c
...
@@ -423,7 +423,7 @@
...
@@ -423,7 +423,7 @@
columns
:[[
columns
:[[
{
title
:
'
商品类型
'
,
field
:
'
MType
'
,
width
:
80
,
hidden
:
isShowMaterialTypeColumn
},
{
title
:
'
商品类型
'
,
field
:
'
MType
'
,
width
:
80
,
hidden
:
isShowMaterialTypeColumn
},
{
title
:
depotHeadName
,
field
:
'
DepotName
'
,
editor
:
'
validatebox
'
,
width
:
90
},
{
title
:
depotHeadName
,
field
:
'
DepotName
'
,
editor
:
'
validatebox
'
,
width
:
90
},
{
title
:
'
品
名(型号)(扩展信息)(单位)
'
,
field
:
'
MaterialName
'
,
width
:
230
},
{
title
:
'
名
称
(型号)(扩展信息)(单位)
'
,
field
:
'
MaterialName
'
,
width
:
230
},
{
title
:
anotherDepotHeadName
,
field
:
'
AnotherDepotName
'
,
hidden
:
isShowAnotherDepot
,
width
:
90
},
{
title
:
anotherDepotHeadName
,
field
:
'
AnotherDepotName
'
,
hidden
:
isShowAnotherDepot
,
width
:
90
},
{
title
:
'
单位
'
,
field
:
'
Unit
'
,
editor
:
'
validatebox
'
,
width
:
60
},
{
title
:
'
单位
'
,
field
:
'
Unit
'
,
editor
:
'
validatebox
'
,
width
:
60
},
{
title
:
'
数量
'
,
field
:
'
OperNumber
'
,
editor
:
'
validatebox
'
,
width
:
60
},
{
title
:
'
数量
'
,
field
:
'
OperNumber
'
,
editor
:
'
validatebox
'
,
width
:
60
},
...
@@ -434,7 +434,7 @@
...
@@ -434,7 +434,7 @@
{
title
:
'
税额
'
,
field
:
'
TaxMoney
'
,
editor
:
'
validatebox
'
,
hidden
:
isShowTaxColumn
,
width
:
75
},
{
title
:
'
税额
'
,
field
:
'
TaxMoney
'
,
editor
:
'
validatebox
'
,
hidden
:
isShowTaxColumn
,
width
:
75
},
{
title
:
'
价税合计
'
,
field
:
'
TaxLastMoney
'
,
editor
:
'
validatebox
'
,
hidden
:
isShowTaxColumn
,
width
:
75
},
{
title
:
'
价税合计
'
,
field
:
'
TaxLastMoney
'
,
editor
:
'
validatebox
'
,
hidden
:
isShowTaxColumn
,
width
:
75
},
{
title
:
'
备注
'
,
field
:
'
Remark
'
,
editor
:
'
validatebox
'
,
width
:
120
},
{
title
:
'
备注
'
,
field
:
'
Remark
'
,
editor
:
'
validatebox
'
,
width
:
120
},
{
title
:
'
品
名-别
'
,
field
:
'
OtherField1
'
,
editor
:
'
validatebox
'
,
hidden
:
otherColumns
,
width
:
60
},
{
title
:
'
名
称
-别
'
,
field
:
'
OtherField1
'
,
editor
:
'
validatebox
'
,
hidden
:
otherColumns
,
width
:
60
},
{
title
:
'
型号-别
'
,
field
:
'
OtherField2
'
,
editor
:
'
validatebox
'
,
hidden
:
otherColumns
,
width
:
60
},
{
title
:
'
型号-别
'
,
field
:
'
OtherField2
'
,
editor
:
'
validatebox
'
,
hidden
:
otherColumns
,
width
:
60
},
{
title
:
'
颜色-别
'
,
field
:
'
OtherField3
'
,
editor
:
'
validatebox
'
,
hidden
:
otherColumns
,
width
:
60
},
{
title
:
'
颜色-别
'
,
field
:
'
OtherField3
'
,
editor
:
'
validatebox
'
,
hidden
:
otherColumns
,
width
:
60
},
{
title
:
'
备注1
'
,
field
:
'
OtherField4
'
,
editor
:
'
validatebox
'
,
hidden
:
true
,
width
:
60
},
{
title
:
'
备注1
'
,
field
:
'
OtherField4
'
,
editor
:
'
validatebox
'
,
hidden
:
true
,
width
:
60
},
...
...
erp_web/js/pages/materials/in_out.js
View file @
d344771c
...
@@ -678,7 +678,7 @@
...
@@ -678,7 +678,7 @@
}
}
}
}
},
},
{
title
:
'
条码_
品
名(规格)(型号)(扩展信息)(单位)
'
,
field
:
'
MaterialExtendId
'
,
width
:
270
,
{
title
:
'
条码_名
称
(规格)(型号)(扩展信息)(单位)
'
,
field
:
'
MaterialExtendId
'
,
width
:
270
,
formatter
:
function
(
value
,
row
,
index
){
formatter
:
function
(
value
,
row
,
index
){
return
row
.
MaterialName
;
return
row
.
MaterialName
;
},
},
...
@@ -696,7 +696,7 @@
...
@@ -696,7 +696,7 @@
panelHeight
:
380
,
//下拉框的高度
panelHeight
:
380
,
//下拉框的高度
columns
:[[
columns
:[[
{
field
:
'
mBarCode
'
,
title
:
'
条码
'
,
width
:
120
},
{
field
:
'
mBarCode
'
,
title
:
'
条码
'
,
width
:
120
},
{
field
:
'
name
'
,
title
:
'
品
名
'
,
width
:
140
},
{
field
:
'
name
'
,
title
:
'
名
称
'
,
width
:
140
},
{
field
:
'
standard
'
,
title
:
'
规格
'
,
width
:
80
},
{
field
:
'
standard
'
,
title
:
'
规格
'
,
width
:
80
},
{
field
:
'
model
'
,
title
:
'
型号
'
,
width
:
80
},
{
field
:
'
model
'
,
title
:
'
型号
'
,
width
:
80
},
{
field
:
'
unit
'
,
title
:
'
单位
'
,
width
:
60
},
{
field
:
'
unit
'
,
title
:
'
单位
'
,
width
:
60
},
...
@@ -833,7 +833,7 @@
...
@@ -833,7 +833,7 @@
});
});
function
materialSelect
(
rec
)
{
function
materialSelect
(
rec
)
{
var
body
,
footer
,
input
;
//定义表格和文本框
var
body
,
footer
,
input
;
//定义表格和文本框
var
ratio
=
1
;
//比例-
品
名专用
var
ratio
=
1
;
//比例-名
称
专用
var
loadRatio
=
1
;
//在单位输入框上面加载比例字段
var
loadRatio
=
1
;
//在单位输入框上面加载比例字段
if
(
rec
)
{
if
(
rec
)
{
var
meId
=
rec
.
Id
;
var
meId
=
rec
.
Id
;
...
@@ -955,7 +955,7 @@
...
@@ -955,7 +955,7 @@
columns
:[[
columns
:[[
{
title
:
'
商品类型
'
,
field
:
'
MType
'
,
width
:
80
,
hidden
:
isShowMaterialTypeColumn
},
{
title
:
'
商品类型
'
,
field
:
'
MType
'
,
width
:
80
,
hidden
:
isShowMaterialTypeColumn
},
{
title
:
depotHeadName
,
field
:
'
DepotName
'
,
editor
:
'
validatebox
'
,
width
:
90
},
{
title
:
depotHeadName
,
field
:
'
DepotName
'
,
editor
:
'
validatebox
'
,
width
:
90
},
{
title
:
'
条码_
品
名(规格)(型号)(扩展信息)(单位)
'
,
field
:
'
MaterialName
'
,
width
:
270
},
{
title
:
'
条码_名
称
(规格)(型号)(扩展信息)(单位)
'
,
field
:
'
MaterialName
'
,
width
:
270
},
{
title
:
'
库存
'
,
field
:
'
Stock
'
,
width
:
50
},
{
title
:
'
库存
'
,
field
:
'
Stock
'
,
width
:
50
},
{
title
:
anotherDepotHeadName
,
field
:
'
AnotherDepotName
'
,
hidden
:
isShowAnotherDepot
,
width
:
90
},
{
title
:
anotherDepotHeadName
,
field
:
'
AnotherDepotName
'
,
hidden
:
isShowAnotherDepot
,
width
:
90
},
{
title
:
'
单位
'
,
field
:
'
Unit
'
,
editor
:
'
validatebox
'
,
width
:
60
},
{
title
:
'
单位
'
,
field
:
'
Unit
'
,
editor
:
'
validatebox
'
,
width
:
60
},
...
...
erp_web/pages/materials/material.html
View file @
d344771c
...
@@ -35,7 +35,13 @@
...
@@ -35,7 +35,13 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"control-label"
>
品名:
</label>
<label
class=
"control-label"
>
条码:
</label>
<div
class=
"control-inline"
>
<input
type=
"text"
id=
"searchBarCode"
name=
"searchBarCode"
value=
""
maxlength=
"100"
class=
"easyui-textbox width-90"
/>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"control-label"
>
名称:
</label>
<div
class=
"control-inline"
>
<div
class=
"control-inline"
>
<input
type=
"text"
id=
"searchName"
name=
"searchName"
value=
""
maxlength=
"100"
class=
"easyui-textbox width-90"
/>
<input
type=
"text"
id=
"searchName"
name=
"searchName"
value=
""
maxlength=
"100"
class=
"easyui-textbox width-90"
/>
</div>
</div>
...
@@ -72,7 +78,7 @@
...
@@ -72,7 +78,7 @@
<div
title=
"基本信息"
style=
"padding:20px;"
>
<div
title=
"基本信息"
style=
"padding:20px;"
>
<table
width=
"100%"
style=
"min-width:1150px;"
>
<table
width=
"100%"
style=
"min-width:1150px;"
>
<tr>
<tr>
<td
style=
"width:60px; height:30px;"
>
品
名
</td>
<td
style=
"width:60px; height:30px;"
>
名
称
</td>
<td
style=
"padding:5px;width:250px;"
>
<td
style=
"padding:5px;width:250px;"
>
<input
name=
"Name"
id=
"Name"
class=
"easyui-textbox"
<input
name=
"Name"
id=
"Name"
class=
"easyui-textbox"
data-options=
"required:true,validType:'length[1,30]'"
data-options=
"required:true,validType:'length[1,30]'"
...
@@ -464,12 +470,13 @@
...
@@ -464,12 +470,13 @@
return
str
;
return
str
;
}
}
},
},
{
title
:
'
品名
'
,
field
:
'
name
'
,
width
:
120
},
{
title
:
'
条码
'
,
field
:
'
mBarCode
'
,
width
:
120
},
{
title
:
'
名称
'
,
field
:
'
name
'
,
width
:
120
},
{
title
:
'
规格
'
,
field
:
'
standard
'
,
width
:
80
},
{
title
:
'
规格
'
,
field
:
'
standard
'
,
width
:
80
},
{
title
:
'
型号
'
,
field
:
'
model
'
,
width
:
80
},
{
title
:
'
型号
'
,
field
:
'
model
'
,
width
:
80
},
{
title
:
'
类别
'
,
field
:
'
categoryName
'
,
width
:
80
},
{
title
:
'
类别
'
,
field
:
'
categoryName
'
,
width
:
80
},
{
title
:
'
扩展信息
'
,
field
:
'
materialOther
'
,
width
:
1
5
0
},
{
title
:
'
扩展信息
'
,
field
:
'
materialOther
'
,
width
:
1
4
0
},
{
title
:
'
单位
'
,
field
:
'
unit
'
,
width
:
10
0
,
{
title
:
'
单位
'
,
field
:
'
unit
'
,
width
:
8
0
,
formatter
:
function
(
value
,
rec
)
{
formatter
:
function
(
value
,
rec
)
{
if
(
value
)
{
if
(
value
)
{
return
value
;
return
value
;
...
@@ -1192,7 +1199,7 @@
...
@@ -1192,7 +1199,7 @@
//保存信息
//保存信息
$
(
"
#saveMaterial
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
$
(
"
#saveMaterial
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
if
(
!
$
(
'
#Name
'
).
val
())
{
if
(
!
$
(
'
#Name
'
).
val
())
{
$
.
messager
.
alert
(
'
提示
'
,
'
品
名不能为空!
'
,
'
warning
'
);
$
.
messager
.
alert
(
'
提示
'
,
'
名
称
不能为空!
'
,
'
warning
'
);
return
;
return
;
}
}
if
(
!
$
(
"
#Unit
"
).
val
()
&&
!
$
(
"
#manyUnit
"
).
val
())
{
if
(
!
$
(
"
#Unit
"
).
val
()
&&
!
$
(
"
#manyUnit
"
).
val
())
{
...
@@ -1407,6 +1414,7 @@
...
@@ -1407,6 +1414,7 @@
});
});
function
showMaterialDetails
(
pageNo
,
pageSize
)
{
function
showMaterialDetails
(
pageNo
,
pageSize
)
{
var
barCode
=
$
.
trim
(
$
(
"
#searchBarCode
"
).
val
());
var
name
=
$
.
trim
(
$
(
"
#searchName
"
).
val
());
var
name
=
$
.
trim
(
$
(
"
#searchName
"
).
val
());
var
standard
=
$
.
trim
(
$
(
"
#searchStandard
"
).
val
());
var
standard
=
$
.
trim
(
$
(
"
#searchStandard
"
).
val
());
var
model
=
$
.
trim
(
$
(
"
#searchModel
"
).
val
());
var
model
=
$
.
trim
(
$
(
"
#searchModel
"
).
val
());
...
@@ -1416,6 +1424,7 @@
...
@@ -1416,6 +1424,7 @@
dataType
:
"
json
"
,
dataType
:
"
json
"
,
data
:
({
data
:
({
search
:
JSON
.
stringify
({
search
:
JSON
.
stringify
({
barCode
:
barCode
,
name
:
name
,
name
:
name
,
standard
:
standard
,
standard
:
standard
,
model
:
model
,
model
:
model
,
...
@@ -1443,6 +1452,7 @@
...
@@ -1443,6 +1452,7 @@
//重置按钮
//重置按钮
$
(
"
#searchResetBtn
"
).
unbind
().
bind
({
$
(
"
#searchResetBtn
"
).
unbind
().
bind
({
click
:
function
()
{
click
:
function
()
{
$
(
"
#searchBarCode
"
).
textbox
(
"
clear
"
);
$
(
"
#searchParentName
"
).
textbox
(
"
clear
"
);
$
(
"
#searchParentName
"
).
textbox
(
"
clear
"
);
$
(
"
#searchParentId
"
).
val
(
""
);
$
(
"
#searchParentId
"
).
val
(
""
);
$
(
"
#searchName
"
).
textbox
(
"
clear
"
);
$
(
"
#searchName
"
).
textbox
(
"
clear
"
);
...
...
erp_web/pages/materials/material_forselect.html
View file @
d344771c
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
collapsible=
"true"
closable=
"false"
>
collapsible=
"true"
closable=
"false"
>
<table
id=
"searchForSelectTable"
>
<table
id=
"searchForSelectTable"
>
<tr>
<tr>
<td>
品
名:
</td>
<td>
名
称
:
</td>
<td>
<td>
<input
name=
"searchForSelectName"
id=
"searchForSelectName"
style=
"width:80px;"
/>
<input
name=
"searchForSelectName"
id=
"searchForSelectName"
style=
"width:80px;"
/>
</td>
</td>
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
pageList
:
initPageNum
,
pageList
:
initPageNum
,
columns
:
[[
columns
:
[[
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
hidden
:
true
},
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
hidden
:
true
},
{
title
:
'
品
名
'
,
field
:
'
name
'
,
width
:
150
},
{
title
:
'
名
称
'
,
field
:
'
name
'
,
width
:
150
},
{
title
:
'
型号
'
,
field
:
'
model
'
,
width
:
100
},
{
title
:
'
型号
'
,
field
:
'
model
'
,
width
:
100
},
{
title
:
'
类别
'
,
field
:
'
categoryName
'
,
width
:
130
},
{
title
:
'
类别
'
,
field
:
'
categoryName
'
,
width
:
130
},
{
title
:
'
单位
'
,
field
:
'
unit
'
,
width
:
60
}
{
title
:
'
单位
'
,
field
:
'
unit
'
,
width
:
60
}
...
...
src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
d344771c
...
@@ -170,7 +170,7 @@ public class DepotItemController {
...
@@ -170,7 +170,7 @@ public class DepotItemController {
ratio
=
diEx
.
getUName
();
ratio
=
diEx
.
getUName
();
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
}
//
品
名/型号/扩展信息/包装
//名
称
/型号/扩展信息/包装
String
MaterialName
=
diEx
.
getBarCode
()
+
"_"
+
((
diEx
.
getMName
()
==
null
||
diEx
.
getMName
().
equals
(
""
))
?
""
:
diEx
.
getMName
())
String
MaterialName
=
diEx
.
getBarCode
()
+
"_"
+
((
diEx
.
getMName
()
==
null
||
diEx
.
getMName
().
equals
(
""
))
?
""
:
diEx
.
getMName
())
+
((
diEx
.
getMStandard
()
==
null
||
diEx
.
getMStandard
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getMStandard
()
+
")"
)
+
((
diEx
.
getMStandard
()
==
null
||
diEx
.
getMStandard
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getMStandard
()
+
")"
)
+
((
diEx
.
getMModel
()
==
null
||
diEx
.
getMModel
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getMModel
()
+
")"
);
+
((
diEx
.
getMModel
()
==
null
||
diEx
.
getMModel
().
equals
(
""
))
?
""
:
"("
+
diEx
.
getMModel
()
+
")"
);
...
...
src/main/java/com/jsh/erp/controller/MaterialController.java
View file @
d344771c
...
@@ -161,7 +161,7 @@ public class MaterialController {
...
@@ -161,7 +161,7 @@ public class MaterialController {
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
}
}
}
//
品
名/型号/扩展信息/包装
//名
称
/型号/扩展信息/包装
String
MaterialName
=
""
;
String
MaterialName
=
""
;
String
mBarCode
=
""
;
String
mBarCode
=
""
;
if
(
material
.
getmBarCode
()!=
null
)
{
if
(
material
.
getmBarCode
()!=
null
)
{
...
@@ -267,7 +267,7 @@ public class MaterialController {
...
@@ -267,7 +267,7 @@ public class MaterialController {
ratio
=
material
.
getUnitName
();
ratio
=
material
.
getUnitName
();
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
ratio
=
ratio
.
substring
(
ratio
.
indexOf
(
"("
));
}
}
//
品
名/型号/扩展信息/包装
//名
称
/型号/扩展信息/包装
String
MaterialName
=
""
;
String
MaterialName
=
""
;
MaterialName
=
MaterialName
+
material
.
getmBarCode
()
+
"_"
+
material
.
getName
()
MaterialName
=
MaterialName
+
material
.
getmBarCode
()
+
"_"
+
material
.
getName
()
+
((
material
.
getStandard
()
==
null
||
material
.
getStandard
().
equals
(
""
))
?
""
:
"("
+
material
.
getStandard
()
+
")"
);
+
((
material
.
getStandard
()
==
null
||
material
.
getStandard
().
equals
(
""
))
?
""
:
"("
+
material
.
getStandard
()
+
")"
);
...
@@ -320,7 +320,7 @@ public class MaterialController {
...
@@ -320,7 +320,7 @@ public class MaterialController {
try
{
try
{
List
<
MaterialVo4Unit
>
dataList
=
materialService
.
findByAll
(
StringUtil
.
toNull
(
name
),
StringUtil
.
toNull
(
model
),
List
<
MaterialVo4Unit
>
dataList
=
materialService
.
findByAll
(
StringUtil
.
toNull
(
name
),
StringUtil
.
toNull
(
model
),
StringUtil
.
toNull
(
categoryIds
));
StringUtil
.
toNull
(
categoryIds
));
String
[]
names
=
{
"
品
名"
,
"类型"
,
"型号"
,
"安全存量"
,
"单位"
,
"零售价"
,
"最低售价"
,
"预计采购价"
,
"批发价"
,
"备注"
,
"状态"
};
String
[]
names
=
{
"名
称
"
,
"类型"
,
"型号"
,
"安全存量"
,
"单位"
,
"零售价"
,
"最低售价"
,
"预计采购价"
,
"批发价"
,
"备注"
,
"状态"
};
String
title
=
"商品信息"
;
String
title
=
"商品信息"
;
List
<
String
[]>
objects
=
new
ArrayList
<
String
[]>();
List
<
String
[]>
objects
=
new
ArrayList
<
String
[]>();
if
(
null
!=
dataList
)
{
if
(
null
!=
dataList
)
{
...
...
src/main/java/com/jsh/erp/datasource/mappers/MaterialMapperEx.java
View file @
d344771c
...
@@ -18,6 +18,7 @@ import java.util.Map;
...
@@ -18,6 +18,7 @@ import java.util.Map;
public
interface
MaterialMapperEx
{
public
interface
MaterialMapperEx
{
List
<
MaterialVo4Unit
>
selectByConditionMaterial
(
List
<
MaterialVo4Unit
>
selectByConditionMaterial
(
@Param
(
"barCode"
)
String
barCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"name"
)
String
name
,
@Param
(
"standard"
)
String
standard
,
@Param
(
"standard"
)
String
standard
,
@Param
(
"model"
)
String
model
,
@Param
(
"model"
)
String
model
,
...
@@ -27,6 +28,7 @@ public interface MaterialMapperEx {
...
@@ -27,6 +28,7 @@ public interface MaterialMapperEx {
@Param
(
"rows"
)
Integer
rows
);
@Param
(
"rows"
)
Integer
rows
);
Long
countsByMaterial
(
Long
countsByMaterial
(
@Param
(
"barCode"
)
String
barCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"name"
)
String
name
,
@Param
(
"standard"
)
String
standard
,
@Param
(
"standard"
)
String
standard
,
@Param
(
"model"
)
String
model
,
@Param
(
"model"
)
String
model
,
...
...
src/main/java/com/jsh/erp/service/material/MaterialComponent.java
View file @
d344771c
...
@@ -32,23 +32,25 @@ public class MaterialComponent implements ICommonQuery {
...
@@ -32,23 +32,25 @@ public class MaterialComponent implements ICommonQuery {
private
List
<?>
getMaterialList
(
Map
<
String
,
String
>
map
)
throws
Exception
{
private
List
<?>
getMaterialList
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
barCode
=
StringUtil
.
getInfo
(
search
,
"barCode"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
standard
=
StringUtil
.
getInfo
(
search
,
"standard"
);
String
standard
=
StringUtil
.
getInfo
(
search
,
"standard"
);
String
model
=
StringUtil
.
getInfo
(
search
,
"model"
);
String
model
=
StringUtil
.
getInfo
(
search
,
"model"
);
String
categoryIds
=
StringUtil
.
getInfo
(
search
,
"categoryIds"
);
String
categoryIds
=
StringUtil
.
getInfo
(
search
,
"categoryIds"
);
String
mpList
=
StringUtil
.
getInfo
(
search
,
"mpList"
);
String
mpList
=
StringUtil
.
getInfo
(
search
,
"mpList"
);
return
materialService
.
select
(
name
,
standard
,
model
,
categoryIds
,
mpList
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
return
materialService
.
select
(
barCode
,
name
,
standard
,
model
,
categoryIds
,
mpList
,
QueryUtils
.
offset
(
map
),
QueryUtils
.
rows
(
map
));
}
}
@Override
@Override
public
Long
counts
(
Map
<
String
,
String
>
map
)
throws
Exception
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
barCode
=
StringUtil
.
getInfo
(
search
,
"barCode"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
name
=
StringUtil
.
getInfo
(
search
,
"name"
);
String
standard
=
StringUtil
.
getInfo
(
search
,
"standard"
);
String
standard
=
StringUtil
.
getInfo
(
search
,
"standard"
);
String
model
=
StringUtil
.
getInfo
(
search
,
"model"
);
String
model
=
StringUtil
.
getInfo
(
search
,
"model"
);
String
categoryIds
=
StringUtil
.
getInfo
(
search
,
"categoryIds"
);
String
categoryIds
=
StringUtil
.
getInfo
(
search
,
"categoryIds"
);
String
mpList
=
StringUtil
.
getInfo
(
search
,
"mpList"
);
String
mpList
=
StringUtil
.
getInfo
(
search
,
"mpList"
);
return
materialService
.
countMaterial
(
name
,
standard
,
model
,
categoryIds
,
mpList
);
return
materialService
.
countMaterial
(
barCode
,
name
,
standard
,
model
,
categoryIds
,
mpList
);
}
}
@Override
@Override
...
...
src/main/java/com/jsh/erp/service/material/MaterialService.java
View file @
d344771c
...
@@ -84,22 +84,17 @@ public class MaterialService {
...
@@ -84,22 +84,17 @@ public class MaterialService {
return
list
;
return
list
;
}
}
public
List
<
MaterialVo4Unit
>
select
(
String
name
,
String
standard
,
String
model
,
String
categoryIds
,
String
mpList
,
int
offset
,
int
rows
)
public
List
<
MaterialVo4Unit
>
select
(
String
barCode
,
String
name
,
String
standard
,
String
model
,
String
categoryIds
,
String
mpList
,
int
offset
,
int
rows
)
throws
Exception
{
throws
Exception
{
String
[]
mpArr
=
mpList
.
split
(
","
);
String
[]
mpArr
=
mpList
.
split
(
","
);
List
<
MaterialVo4Unit
>
resList
=
new
ArrayList
<
MaterialVo4Unit
>();
List
<
MaterialVo4Unit
>
resList
=
new
ArrayList
<>();
List
<
MaterialVo4Unit
>
list
=
null
;
List
<
MaterialVo4Unit
>
list
=
null
;
try
{
try
{
list
=
materialMapperEx
.
selectByConditionMaterial
(
name
,
standard
,
model
,
categoryIds
,
mpList
,
offset
,
rows
);
list
=
materialMapperEx
.
selectByConditionMaterial
(
barCode
,
name
,
standard
,
model
,
categoryIds
,
mpList
,
offset
,
rows
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
JshException
.
readFail
(
logger
,
e
);
}
}
if
(
null
!=
list
)
{
if
(
null
!=
list
)
{
List
<
Long
>
idList
=
new
ArrayList
<
Long
>();
for
(
MaterialVo4Unit
m
:
list
)
{
idList
.
add
(
m
.
getId
());
}
List
<
MaterialExtend
>
meList
=
materialExtendService
.
getListByMIds
(
idList
);
for
(
MaterialVo4Unit
m
:
list
)
{
for
(
MaterialVo4Unit
m
:
list
)
{
//扩展信息
//扩展信息
String
materialOther
=
""
;
String
materialOther
=
""
;
...
@@ -120,24 +115,16 @@ public class MaterialService {
...
@@ -120,24 +115,16 @@ public class MaterialService {
m
.
setMaterialOther
(
materialOther
);
m
.
setMaterialOther
(
materialOther
);
Long
tenantId
=
m
.
getTenantId
();
Long
tenantId
=
m
.
getTenantId
();
m
.
setStock
(
depotItemService
.
getStockByParam
(
null
,
m
.
getId
(),
null
,
null
,
tenantId
));
m
.
setStock
(
depotItemService
.
getStockByParam
(
null
,
m
.
getId
(),
null
,
null
,
tenantId
));
for
(
MaterialExtend
me:
meList
)
{
if
(
me
.
getMaterialId
().
longValue
()
==
m
.
getId
().
longValue
())
{
m
.
setPurchaseDecimal
(
me
.
getPurchaseDecimal
());
//采购价
m
.
setCommodityDecimal
(
me
.
getCommodityDecimal
());
//零售价
m
.
setWholesaleDecimal
(
me
.
getWholesaleDecimal
());
//销售价
m
.
setLowDecimal
(
me
.
getLowDecimal
());
//最低售价
}
}
resList
.
add
(
m
);
resList
.
add
(
m
);
}
}
}
}
return
resList
;
return
resList
;
}
}
public
Long
countMaterial
(
String
name
,
String
standard
,
String
model
,
String
categoryIds
,
String
mpList
)
throws
Exception
{
public
Long
countMaterial
(
String
barCode
,
String
name
,
String
standard
,
String
model
,
String
categoryIds
,
String
mpList
)
throws
Exception
{
Long
result
=
null
;
Long
result
=
null
;
try
{
try
{
result
=
materialMapperEx
.
countsByMaterial
(
name
,
standard
,
model
,
categoryIds
,
mpList
);
result
=
materialMapperEx
.
countsByMaterial
(
barCode
,
name
,
standard
,
model
,
categoryIds
,
mpList
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
JshException
.
readFail
(
logger
,
e
);
}
}
...
...
src/main/resources/mapper_xml/MaterialMapperEx.xml
View file @
d344771c
...
@@ -4,7 +4,11 @@
...
@@ -4,7 +4,11 @@
<resultMap
extends=
"com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"
id=
"ResultMapList"
type=
"com.jsh.erp.datasource.entities.MaterialVo4Unit"
>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"
id=
"ResultMapList"
type=
"com.jsh.erp.datasource.entities.MaterialVo4Unit"
>
<result
column=
"unitName"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
<result
column=
"unitName"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
<result
column=
"categoryName"
jdbcType=
"VARCHAR"
property=
"categoryName"
/>
<result
column=
"categoryName"
jdbcType=
"VARCHAR"
property=
"categoryName"
/>
<result
column=
"m_bar_code"
jdbcType=
"VARCHAR"
property=
"mBarCode"
/>
<result
column=
"bar_code"
jdbcType=
"VARCHAR"
property=
"mBarCode"
/>
<result
column=
"purchase_decimal"
jdbcType=
"VARCHAR"
property=
"purchaseDecimal"
/>
<result
column=
"commodity_decimal"
jdbcType=
"VARCHAR"
property=
"commodityDecimal"
/>
<result
column=
"wholesale_decimal"
jdbcType=
"VARCHAR"
property=
"wholesaleDecimal"
/>
<result
column=
"low_decimal"
jdbcType=
"VARCHAR"
property=
"lowDecimal"
/>
</resultMap>
</resultMap>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"
id=
"ResultAndUnitMap"
type=
"com.jsh.erp.datasource.entities.MaterialVo4Unit"
>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"
id=
"ResultAndUnitMap"
type=
"com.jsh.erp.datasource.entities.MaterialVo4Unit"
>
...
@@ -12,11 +16,17 @@
...
@@ -12,11 +16,17 @@
</resultMap>
</resultMap>
<select
id=
"selectByConditionMaterial"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultMapList"
>
<select
id=
"selectByConditionMaterial"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultMapList"
>
select m.*,u.uname unitName, mc.name categoryName
select m.*,u.uname unitName, mc.name categoryName, me.bar_code,
me.purchase_decimal, me.commodity_decimal, me.wholesale_decimal,me.low_decimal
FROM jsh_material m
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
where 1=1
and me.default_flag=1
<if
test=
"barCode != null"
>
and me.bar_code like '%${barCode}%'
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
and m.name like '%${name}%'
and m.name like '%${name}%'
</if>
</if>
...
@@ -40,9 +50,14 @@
...
@@ -40,9 +50,14 @@
SELECT
SELECT
COUNT(m.id)
COUNT(m.id)
FROM jsh_material m
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
WHERE 1=1
WHERE 1=1
and me.default_flag=1
<if
test=
"barCode != null"
>
and me.bar_code like '%${barCode}%'
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
and m.name like '%${name}%'
and m.name like '%${name}%'
</if>
</if>
...
...
Write
Preview
Supports
Markdown
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