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
d8b10594
Commit
d8b10594
authored
Aug 29, 2020
by
季圣华
Browse files
单据模块代码优化
parent
79ecd87f
Changes
2
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/materials/in_out.js
View file @
d8b10594
...
...
@@ -2377,12 +2377,16 @@
if
(
$
(
'
#materialData
'
).
datagrid
(
'
validateRow
'
,
editIndex
))
{
//仓库信息
var
edDepot
=
$
(
'
#materialData
'
).
datagrid
(
'
getEditor
'
,
{
index
:
editIndex
,
field
:
'
DepotId
'
});
var
DepotName
=
$
(
edDepot
.
target
).
combobox
(
'
getText
'
);
$
(
'
#materialData
'
).
datagrid
(
'
getRows
'
)[
editIndex
][
'
DepotName
'
]
=
DepotName
;
if
(
edDepot
)
{
var
DepotName
=
$
(
edDepot
.
target
).
combobox
(
'
getText
'
);
$
(
'
#materialData
'
).
datagrid
(
'
getRows
'
)[
editIndex
][
'
DepotName
'
]
=
DepotName
;
}
//商品信息
var
edMaterial
=
$
(
'
#materialData
'
).
datagrid
(
'
getEditor
'
,
{
index
:
editIndex
,
field
:
'
MaterialExtendId
'
});
var
MaterialName
=
$
(
edMaterial
.
target
).
next
().
find
(
'
input.textbox-text
'
).
val
();
$
(
'
#materialData
'
).
datagrid
(
'
getRows
'
)[
editIndex
][
'
MaterialName
'
]
=
MaterialName
;
if
(
edMaterial
)
{
var
MaterialName
=
$
(
edMaterial
.
target
).
next
().
find
(
'
input.textbox-text
'
).
val
();
$
(
'
#materialData
'
).
datagrid
(
'
getRows
'
)[
editIndex
][
'
MaterialName
'
]
=
MaterialName
;
}
//其它信息
$
(
'
#materialData
'
).
datagrid
(
'
endEdit
'
,
editIndex
);
editIndex
=
undefined
;
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
d8b10594
...
...
@@ -367,7 +367,7 @@ public class DepotItemService {
depotItem
.
setMaterialId
(
materialId
);
depotItem
.
setMaterialExtendId
(
tempInsertedJson
.
getLong
(
"MaterialExtendId"
));
depotItem
.
setMaterialUnit
(
tempInsertedJson
.
getString
(
"Unit"
));
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"OperNumber"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"OperNumber"
)))
{
depotItem
.
setOperNumber
(
tempInsertedJson
.
getBigDecimal
(
"OperNumber"
));
try
{
String
Unit
=
tempInsertedJson
.
get
(
"Unit"
).
toString
();
...
...
@@ -392,13 +392,13 @@ public class DepotItemService {
logger
.
error
(
">>>>>>>>>>>>>>>>>>>设置基础数量异常"
,
e
);
}
}
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"UnitPrice"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"UnitPrice"
)))
{
depotItem
.
setUnitPrice
(
tempInsertedJson
.
getBigDecimal
(
"UnitPrice"
));
}
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"TaxUnitPrice"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"TaxUnitPrice"
)))
{
depotItem
.
setTaxUnitPrice
(
tempInsertedJson
.
getBigDecimal
(
"TaxUnitPrice"
));
}
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"AllPrice"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"AllPrice"
)))
{
depotItem
.
setAllPrice
(
tempInsertedJson
.
getBigDecimal
(
"AllPrice"
));
}
depotItem
.
setRemark
(
tempInsertedJson
.
getString
(
"Remark"
));
...
...
@@ -408,13 +408,13 @@ public class DepotItemService {
if
(
tempInsertedJson
.
get
(
"AnotherDepotId"
)
!=
null
&&
!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"AnotherDepotId"
).
toString
()))
{
depotItem
.
setAnotherDepotId
(
tempInsertedJson
.
getLong
(
"AnotherDepotId"
));
}
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"TaxRate"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"TaxRate"
)))
{
depotItem
.
setTaxRate
(
tempInsertedJson
.
getBigDecimal
(
"TaxRate"
));
}
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"TaxMoney"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"TaxMoney"
)))
{
depotItem
.
setTaxMoney
(
tempInsertedJson
.
getBigDecimal
(
"TaxMoney"
));
}
if
(
!
StringUtil
.
isE
mpty
(
tempInsertedJson
.
get
(
"TaxLastMoney"
)
.
toString
()
))
{
if
(
StringUtil
.
isE
xist
(
tempInsertedJson
.
get
(
"TaxLastMoney"
)))
{
depotItem
.
setTaxLastMoney
(
tempInsertedJson
.
getBigDecimal
(
"TaxLastMoney"
));
}
if
(
tempInsertedJson
.
get
(
"OtherField1"
)
!=
null
)
{
...
...
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