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
814b3839
Commit
814b3839
authored
Sep 20, 2017
by
季圣华
Browse files
组装、拆卸单的初稿
parent
90a9929a
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
sql/jsh_erp.sql
View file @
814b3839
This diff is collapsed.
Click to expand it.
src/main/java/com/jsh/action/materials/DepotItemAction.java
View file @
814b3839
...
@@ -116,6 +116,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -116,6 +116,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
if
(
tempInsertedJson
.
get
(
"OtherField3"
)!=
null
){
depotItem
.
setOtherField3
(
tempInsertedJson
.
getString
(
"OtherField3"
));}
if
(
tempInsertedJson
.
get
(
"OtherField3"
)!=
null
){
depotItem
.
setOtherField3
(
tempInsertedJson
.
getString
(
"OtherField3"
));}
if
(
tempInsertedJson
.
get
(
"OtherField4"
)!=
null
){
depotItem
.
setOtherField4
(
tempInsertedJson
.
getString
(
"OtherField4"
));}
if
(
tempInsertedJson
.
get
(
"OtherField4"
)!=
null
){
depotItem
.
setOtherField4
(
tempInsertedJson
.
getString
(
"OtherField4"
));}
if
(
tempInsertedJson
.
get
(
"OtherField5"
)!=
null
){
depotItem
.
setOtherField5
(
tempInsertedJson
.
getString
(
"OtherField5"
));}
if
(
tempInsertedJson
.
get
(
"OtherField5"
)!=
null
){
depotItem
.
setOtherField5
(
tempInsertedJson
.
getString
(
"OtherField5"
));}
if
(
tempInsertedJson
.
get
(
"MType"
)!=
null
){
depotItem
.
setMType
(
tempInsertedJson
.
getString
(
"MType"
));}
depotItemService
.
create
(
depotItem
);
depotItemService
.
create
(
depotItem
);
}
}
}
}
...
@@ -190,6 +191,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -190,6 +191,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
depotItem
.
setOtherField3
(
tempUpdatedJson
.
getString
(
"OtherField3"
));
depotItem
.
setOtherField3
(
tempUpdatedJson
.
getString
(
"OtherField3"
));
depotItem
.
setOtherField4
(
tempUpdatedJson
.
getString
(
"OtherField4"
));
depotItem
.
setOtherField4
(
tempUpdatedJson
.
getString
(
"OtherField4"
));
depotItem
.
setOtherField5
(
tempUpdatedJson
.
getString
(
"OtherField5"
));
depotItem
.
setOtherField5
(
tempUpdatedJson
.
getString
(
"OtherField5"
));
depotItem
.
setMType
(
tempUpdatedJson
.
getString
(
"MType"
));
depotItemService
.
create
(
depotItem
);
depotItemService
.
create
(
depotItem
);
}
}
}
}
...
@@ -303,6 +305,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
...
@@ -303,6 +305,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item
.
put
(
"OtherField3"
,
depotItem
.
getOtherField3
());
item
.
put
(
"OtherField3"
,
depotItem
.
getOtherField3
());
item
.
put
(
"OtherField4"
,
depotItem
.
getOtherField4
());
item
.
put
(
"OtherField4"
,
depotItem
.
getOtherField4
());
item
.
put
(
"OtherField5"
,
depotItem
.
getOtherField5
());
item
.
put
(
"OtherField5"
,
depotItem
.
getOtherField5
());
item
.
put
(
"MType"
,
depotItem
.
getMType
());
item
.
put
(
"op"
,
1
);
item
.
put
(
"op"
,
1
);
dataArray
.
add
(
item
);
dataArray
.
add
(
item
);
}
}
...
...
src/main/java/com/jsh/model/po/DepotItem.java
View file @
814b3839
...
@@ -24,6 +24,7 @@ public class DepotItem implements java.io.Serializable
...
@@ -24,6 +24,7 @@ public class DepotItem implements java.io.Serializable
private
String
OtherField3
;
//自定义字段3-制造商
private
String
OtherField3
;
//自定义字段3-制造商
private
String
OtherField4
;
//自定义字段4
private
String
OtherField4
;
//自定义字段4
private
String
OtherField5
;
//自定义字段5
private
String
OtherField5
;
//自定义字段5
private
String
MType
;
//商品类型
public
DepotItem
()
public
DepotItem
()
...
@@ -39,7 +40,7 @@ public class DepotItem implements java.io.Serializable
...
@@ -39,7 +40,7 @@ public class DepotItem implements java.io.Serializable
public
DepotItem
(
DepotHead
headerId
,
Material
materialId
,
String
mUnit
,
public
DepotItem
(
DepotHead
headerId
,
Material
materialId
,
String
mUnit
,
Double
operNumber
,
Double
basicNumber
,
Double
unitPrice
,
Double
taxUnitPrice
,
Double
allPrice
,
String
remark
,
String
img
,
Double
operNumber
,
Double
basicNumber
,
Double
unitPrice
,
Double
taxUnitPrice
,
Double
allPrice
,
String
remark
,
String
img
,
Depot
depotId
,
Depot
anotherDepotId
,
Double
taxRate
,
Double
taxMoney
,
Double
taxLastMoney
,
Depot
depotId
,
Depot
anotherDepotId
,
Double
taxRate
,
Double
taxMoney
,
Double
taxLastMoney
,
String
otherField1
,
String
otherField2
,
String
otherField3
,
String
otherField4
,
String
otherField5
)
{
String
otherField1
,
String
otherField2
,
String
otherField3
,
String
otherField4
,
String
otherField5
,
String
mType
)
{
super
();
super
();
HeaderId
=
headerId
;
HeaderId
=
headerId
;
MaterialId
=
materialId
;
MaterialId
=
materialId
;
...
@@ -61,6 +62,7 @@ public class DepotItem implements java.io.Serializable
...
@@ -61,6 +62,7 @@ public class DepotItem implements java.io.Serializable
OtherField3
=
otherField3
;
OtherField3
=
otherField3
;
OtherField4
=
otherField4
;
OtherField4
=
otherField4
;
OtherField5
=
otherField5
;
OtherField5
=
otherField5
;
MType
=
mType
;
}
}
public
Long
getId
()
{
public
Long
getId
()
{
...
@@ -230,4 +232,12 @@ public class DepotItem implements java.io.Serializable
...
@@ -230,4 +232,12 @@ public class DepotItem implements java.io.Serializable
public
void
setOtherField5
(
String
otherField5
)
{
public
void
setOtherField5
(
String
otherField5
)
{
OtherField5
=
otherField5
;
OtherField5
=
otherField5
;
}
}
public
String
getMType
()
{
return
MType
;
}
public
void
setMType
(
String
MType
)
{
this
.
MType
=
MType
;
}
}
}
src/main/java/com/jsh/model/vo/materials/DepotItemModel.java
View file @
814b3839
...
@@ -30,6 +30,7 @@ public class DepotItemModel implements Serializable
...
@@ -30,6 +30,7 @@ public class DepotItemModel implements Serializable
private
String
OtherField3
;
private
String
OtherField3
;
private
String
OtherField4
;
private
String
OtherField4
;
private
String
OtherField5
;
private
String
OtherField5
;
private
String
MType
;
private
String
Inserted
=
""
;
//json插入记录
private
String
Inserted
=
""
;
//json插入记录
private
String
Deleted
=
""
;
//json删除记录
private
String
Deleted
=
""
;
//json删除记录
...
@@ -362,4 +363,12 @@ public class DepotItemModel implements Serializable
...
@@ -362,4 +363,12 @@ public class DepotItemModel implements Serializable
public
void
setOtherField5
(
String
otherField5
)
{
public
void
setOtherField5
(
String
otherField5
)
{
OtherField5
=
otherField5
;
OtherField5
=
otherField5
;
}
}
public
String
getMType
()
{
return
MType
;
}
public
void
setMType
(
String
MType
)
{
this
.
MType
=
MType
;
}
}
}
src/main/resources/hibernate/DepotItem.hbm.xml
View file @
814b3839
...
@@ -97,6 +97,11 @@
...
@@ -97,6 +97,11 @@
<comment>
自定义字段5
</comment>
<comment>
自定义字段5
</comment>
</column>
</column>
</property>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"MType"
type=
"java.lang.String"
>
<column
length=
"20"
name=
"MType"
>
<comment>
商品类型
</comment>
</column>
</property>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<property
generated=
"never"
lazy=
"false"
name=
"Remark"
type=
"java.lang.String"
>
<column
length=
"200"
name=
"Remark"
>
<column
length=
"200"
name=
"Remark"
>
<comment>
描述
</comment>
<comment>
描述
</comment>
...
...
src/main/webapp/js/pages/materials/in_out.js
View file @
814b3839
...
@@ -138,6 +138,20 @@
...
@@ -138,6 +138,20 @@
organUrl = supUrl;
organUrl = supUrl;
amountNum = "LPXS";
amountNum = "LPXS";
}
}
else if(listTitle === "组装单列表"){
listType = "其它";
listSubType = "组装单";
payTypeTitle = "隐藏";
organUrl = supUrl;
amountNum = "ZZD";
}
else if(listTitle === "拆卸单列表"){
listType = "其它";
listSubType = "拆卸单";
payTypeTitle = "隐藏";
organUrl = supUrl;
amountNum = "CSD";
}
}
}
//初始化系统基础信息
//初始化系统基础信息
function initSystemData_UB(){
function initSystemData_UB(){
...
@@ -474,12 +488,12 @@
...
@@ -474,12 +488,12 @@
});
});
}
}
var isShowLastMoneyColumn = false; //是否显示优惠后金额和价税合计,true为隐藏,false为显示
var isShowLastMoneyColumn = false; //是否显示优惠后金额和价税合计,true为隐藏,false为显示
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"
|| listSubType == "组装单" || listSubType == "拆卸单"
){
isShowLastMoneyColumn = true; //隐藏
isShowLastMoneyColumn = true; //隐藏
}
}
var isShowOrganNameColumn = false; //是否显示供应商、客户等信息,true为隐藏,false为显示
var isShowOrganNameColumn = false; //是否显示供应商、客户等信息,true为隐藏,false为显示
var organNameTitle = ""; //组织名称标题
var organNameTitle = ""; //组织名称标题
if(listSubType == "调拨" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "礼品充值" || listSubType == "礼品销售"
|| listSubType == "组装单" || listSubType == "拆卸单"
){
isShowOrganNameColumn = true; //隐藏
isShowOrganNameColumn = true; //隐藏
}
}
else {
else {
...
@@ -715,9 +729,13 @@
...
@@ -715,9 +729,13 @@
depotTextField = "depotName";
depotTextField = "depotName";
}
}
var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示
var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"
|| listSubType == "组装单" || listSubType == "拆卸单"
){
isShowTaxColumn = true; //隐藏
isShowTaxColumn = true; //隐藏
}
}
var isShowMaterialTypeColumn = true; //是否显示商品类型相关的列,true为隐藏,false为显示
if(listSubType == "组装单" || listSubType == "拆卸单"){
isShowMaterialTypeColumn = false; //显示
}
$('#materialData').datagrid({
$('#materialData').datagrid({
height:245,
height:245,
rownumbers: false,
rownumbers: false,
...
@@ -737,6 +755,7 @@
...
@@ -737,6 +755,7 @@
onClickRow: onClickRow,
onClickRow: onClickRow,
columns:[[
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '商品类型',field: 'MType',editor:'validatebox',hidden:isShowMaterialTypeColumn,width:80},
{ title: depotHeadName, field: 'DepotId', editor: 'validatebox', width: 90,
{ title: depotHeadName, field: 'DepotId', editor: 'validatebox', width: 90,
formatter: function (value, row, index) {
formatter: function (value, row, index) {
return row.DepotName;
return row.DepotName;
...
@@ -1078,9 +1097,13 @@
...
@@ -1078,9 +1097,13 @@
depotHeadName = "仓库名称";
depotHeadName = "仓库名称";
}
}
var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示
var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"
|| listSubType == "组装单" || listSubType == "拆卸单"
){
isShowTaxColumn = true; //隐藏
isShowTaxColumn = true; //隐藏
}
}
var isShowMaterialTypeColumn = true; //是否显示商品类型相关的列,true为隐藏,false为显示
if(listSubType == "组装单" || listSubType == "拆卸单"){
isShowMaterialTypeColumn = false; //显示
}
$('#materialDataShow').datagrid({
$('#materialDataShow').datagrid({
height:245,
height:245,
rownumbers: true,
rownumbers: true,
...
@@ -1096,6 +1119,7 @@
...
@@ -1096,6 +1119,7 @@
showFooter: true,
showFooter: true,
onClickRow: onClickRow,
onClickRow: onClickRow,
columns:[[
columns:[[
{ 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},
...
@@ -2677,6 +2701,15 @@
...
@@ -2677,6 +2701,15 @@
else {
else {
body.find("[field='TaxRate']").find(input).val(0); //默认为0
body.find("[field='TaxRate']").find(input).val(0); //默认为0
}
}
//在商品类型加载 组装件、普通子件
var mType = body.find("[field='MType']");
var rowListLength = mType.find(input).closest(".datagrid-row").attr("datagrid-row-index");
var mTypeValue = "组合件";
if(rowListLength > 0){
mTypeValue = "普通子件";
}
mType.find(input).val(mTypeValue).prop("readonly","readonly");
},500);
},500);
}
}
...
...
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