组装、拆卸单的初稿

This commit is contained in:
季圣华
2017-09-20 23:45:24 +08:00
parent 90a9929aa3
commit 814b3839f3
6 changed files with 75 additions and 14 deletions

View File

@@ -116,6 +116,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
if(tempInsertedJson.get("OtherField3")!=null){depotItem.setOtherField3(tempInsertedJson.getString("OtherField3"));}
if(tempInsertedJson.get("OtherField4")!=null){depotItem.setOtherField4(tempInsertedJson.getString("OtherField4"));}
if(tempInsertedJson.get("OtherField5")!=null){depotItem.setOtherField5(tempInsertedJson.getString("OtherField5"));}
if(tempInsertedJson.get("MType")!=null){depotItem.setMType(tempInsertedJson.getString("MType"));}
depotItemService.create(depotItem);
}
}
@@ -190,6 +191,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
depotItem.setOtherField3(tempUpdatedJson.getString("OtherField3"));
depotItem.setOtherField4(tempUpdatedJson.getString("OtherField4"));
depotItem.setOtherField5(tempUpdatedJson.getString("OtherField5"));
depotItem.setMType(tempUpdatedJson.getString("MType"));
depotItemService.create(depotItem);
}
}
@@ -303,6 +305,7 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
item.put("OtherField3", depotItem.getOtherField3());
item.put("OtherField4", depotItem.getOtherField4());
item.put("OtherField5", depotItem.getOtherField5());
item.put("MType", depotItem.getMType());
item.put("op", 1);
dataArray.add(item);
}

View File

@@ -24,6 +24,7 @@ public class DepotItem implements java.io.Serializable
private String OtherField3; //自定义字段3-制造商
private String OtherField4; //自定义字段4
private String OtherField5; //自定义字段5
private String MType; //商品类型
public DepotItem()
@@ -39,7 +40,7 @@ public class DepotItem implements java.io.Serializable
public DepotItem(DepotHead headerId, Material materialId, String mUnit,
Double operNumber, Double basicNumber, Double unitPrice, Double taxUnitPrice, Double allPrice, String remark, String img,
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();
HeaderId = headerId;
MaterialId = materialId;
@@ -61,6 +62,7 @@ public class DepotItem implements java.io.Serializable
OtherField3 = otherField3;
OtherField4 = otherField4;
OtherField5 = otherField5;
MType = mType;
}
public Long getId() {
@@ -230,4 +232,12 @@ public class DepotItem implements java.io.Serializable
public void setOtherField5(String otherField5) {
OtherField5 = otherField5;
}
public String getMType() {
return MType;
}
public void setMType(String MType) {
this.MType = MType;
}
}

View File

@@ -30,6 +30,7 @@ public class DepotItemModel implements Serializable
private String OtherField3;
private String OtherField4;
private String OtherField5;
private String MType;
private String Inserted = ""; //json插入记录
private String Deleted = ""; //json删除记录
@@ -362,4 +363,12 @@ public class DepotItemModel implements Serializable
public void setOtherField5(String otherField5) {
OtherField5 = otherField5;
}
public String getMType() {
return MType;
}
public void setMType(String MType) {
this.MType = MType;
}
}

View File

@@ -97,6 +97,11 @@
<comment>自定义字段5</comment>
</column>
</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">
<column length="200" name="Remark">
<comment>描述</comment>

View File

@@ -138,6 +138,20 @@
organUrl = supUrl;
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(){
@@ -474,12 +488,12 @@
});
}
var isShowLastMoneyColumn = false; //是否显示优惠后金额和价税合计,true为隐藏,false为显示
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售" || listSubType == "组装单" || listSubType == "拆卸单"){
isShowLastMoneyColumn = true; //隐藏
}
var isShowOrganNameColumn = false; //是否显示供应商、客户等信息,true为隐藏,false为显示
var organNameTitle = ""; //组织名称标题
if(listSubType == "调拨" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "礼品充值" || listSubType == "礼品销售" || listSubType == "组装单" || listSubType == "拆卸单"){
isShowOrganNameColumn = true; //隐藏
}
else {
@@ -715,9 +729,13 @@
depotTextField = "depotName";
}
var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售" || listSubType == "组装单" || listSubType == "拆卸单"){
isShowTaxColumn = true; //隐藏
}
var isShowMaterialTypeColumn = true; //是否显示商品类型相关的列,true为隐藏,false为显示
if(listSubType == "组装单" || listSubType == "拆卸单"){
isShowMaterialTypeColumn = false; //显示
}
$('#materialData').datagrid({
height:245,
rownumbers: false,
@@ -737,6 +755,7 @@
onClickRow: onClickRow,
columns:[[
{ 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,
formatter: function (value, row, index) {
return row.DepotName;
@@ -1078,9 +1097,13 @@
depotHeadName = "仓库名称";
}
var isShowTaxColumn = false; //是否显示税率相关的列,true为隐藏,false为显示
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售"){
if(listSubType == "调拨" || listSubType == "其它" || listSubType == "零售" || listSubType == "零售退货" || listSubType == "礼品充值" || listSubType == "礼品销售" || listSubType == "组装单" || listSubType == "拆卸单"){
isShowTaxColumn = true; //隐藏
}
var isShowMaterialTypeColumn = true; //是否显示商品类型相关的列,true为隐藏,false为显示
if(listSubType == "组装单" || listSubType == "拆卸单"){
isShowMaterialTypeColumn = false; //显示
}
$('#materialDataShow').datagrid({
height:245,
rownumbers: true,
@@ -1096,6 +1119,7 @@
showFooter: true,
onClickRow: onClickRow,
columns:[[
{ title: '商品类型',field: 'MType',width:80, hidden:isShowMaterialTypeColumn},
{ title: depotHeadName,field: 'DepotName',editor:'validatebox',width:90},
{ title: '品名(型号)(制造商)(包装)',field: 'MaterialName',width:230},
{ title: anotherDepotHeadName,field: 'AnotherDepotName',hidden:isShowAnotherDepot,width:90},
@@ -2677,6 +2701,15 @@
else {
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);
}