把 制造商 改为 颜色

This commit is contained in:
季圣华
2017-10-10 23:32:26 +08:00
parent 1b5c84beb3
commit 6447194fa3
20 changed files with 55 additions and 53 deletions

View File

@@ -280,9 +280,10 @@ public class DepotItemAction extends BaseAction<DepotItemModel>
ratio = depotItem.getMaterialId().getUnitId().getUName(); ratio = depotItem.getMaterialId().getUnitId().getUName();
ratio = ratio.substring(ratio.indexOf("(")); ratio = ratio.substring(ratio.indexOf("("));
} }
//品名/型号/制造商/包装 //品名/型号/规格/颜色/包装
String MaterialName = depotItem.getMaterialId().getName() + ((depotItem.getMaterialId().getModel() == null||depotItem.getMaterialId().getModel().equals(""))?"":"("+depotItem.getMaterialId().getModel()+ ")") String MaterialName = depotItem.getMaterialId().getName() + ((depotItem.getMaterialId().getModel() == null||depotItem.getMaterialId().getModel().equals(""))?"":"("+depotItem.getMaterialId().getModel()+ ")")
+((depotItem.getMaterialId().getMfrs() == null||depotItem.getMaterialId().getMfrs().equals(""))?"":"("+depotItem.getMaterialId().getMfrs() + ")") +((depotItem.getMaterialId().getStandard() == null||depotItem.getMaterialId().getStandard().equals(""))?"":"("+depotItem.getMaterialId().getStandard() + ")")
+((depotItem.getMaterialId().getColor() == null||depotItem.getMaterialId().getColor().equals(""))?"":"("+depotItem.getMaterialId().getColor() + ")")
+ ratio; + ratio;
item.put("MaterialName", MaterialName); item.put("MaterialName", MaterialName);
item.put("Unit", depotItem.getMUnit()); item.put("Unit", depotItem.getMUnit());

View File

@@ -374,7 +374,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
item.put("SafetyStock", material.getSafetyStock()==null?"" : material.getSafetyStock()); item.put("SafetyStock", material.getSafetyStock()==null?"" : material.getSafetyStock());
item.put("Model", material.getModel()); item.put("Model", material.getModel());
item.put("Standard", material.getStandard()); item.put("Standard", material.getStandard());
item.put("Color", material.getColor()); item.put("Color", material.getColor()==null?"": material.getColor());
item.put("Unit", material.getUnit()); item.put("Unit", material.getUnit());
item.put("RetailPrice", material.getRetailPrice()); item.put("RetailPrice", material.getRetailPrice());
item.put("LowPrice", material.getLowPrice()); item.put("LowPrice", material.getLowPrice());
@@ -430,9 +430,10 @@ public class MaterialAction extends BaseAction<MaterialModel>
ratio = material.getUnitId().getUName(); ratio = material.getUnitId().getUName();
ratio = ratio.substring(ratio.indexOf("(")); ratio = ratio.substring(ratio.indexOf("("));
} }
//品名/型号/制造商/包装 //品名/型号/规格/颜色/包装
String MaterialName = material.getName() + ((material.getModel() == null || material.getModel().equals(""))?"":"("+material.getModel() + ")") String MaterialName = material.getName() + ((material.getModel() == null || material.getModel().equals(""))?"":"("+material.getModel() + ")")
+ ((material.getMfrs() == null || material.getMfrs().equals(""))?"":"("+material.getMfrs() + ")") + ((material.getStandard() == null || material.getStandard().equals(""))?"":"("+material.getStandard() + ")")
+ ((material.getColor() == null || material.getColor().equals(""))?"":"("+material.getColor() + ")")
+ ratio; + ratio;
item.put("MaterialName", MaterialName); item.put("MaterialName", MaterialName);
dataArray.add(item); dataArray.add(item);
@@ -563,7 +564,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
Map<String,Object> condition = new HashMap<String,Object>(); Map<String,Object> condition = new HashMap<String,Object>();
condition.put("Name_s_like", model.getName()); condition.put("Name_s_like", model.getName());
condition.put("Model_s_like", model.getModel()); condition.put("Model_s_like", model.getModel());
condition.put("Mfrs_s_like", model.getMfrs()); condition.put("Color_s_like", model.getColor());
condition.put("Id_s_order", "asc"); condition.put("Id_s_order", "asc");
return condition; return condition;
} }
@@ -579,7 +580,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
Map<String,Object> condition = new HashMap<String,Object>(); Map<String,Object> condition = new HashMap<String,Object>();
condition.put("Name_s_like", model.getName()); condition.put("Name_s_like", model.getName());
condition.put("Model_s_like", model.getModel()); condition.put("Model_s_like", model.getModel());
condition.put("Mfrs_s_like", model.getMfrs()); condition.put("Color_s_like", model.getColor());
condition.put("CategoryId_s_in", model.getCategoryIds()); condition.put("CategoryId_s_in", model.getCategoryIds());
condition.put("Id_s_order", "asc"); condition.put("Id_s_order", "asc");
return condition; return condition;
@@ -592,7 +593,7 @@ public class MaterialAction extends BaseAction<MaterialModel>
} }
condition.put("Name_s_eq", model.getName()); condition.put("Name_s_eq", model.getName());
condition.put("Model_s_eq", model.getModel()); condition.put("Model_s_eq", model.getModel());
condition.put("Mfrs_s_eq", model.getMfrs()); condition.put("Color_s_eq", model.getColor());
if(model.getUnit()!=null){ if(model.getUnit()!=null){
condition.put("Unit_s_eq", model.getUnit()); condition.put("Unit_s_eq", model.getUnit());
} }

View File

@@ -122,7 +122,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException { public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model,' ',jsh_material.Mfrs)) as mName from jsh_depotitem inner join jsh_material " + queryString.append("select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model,' ',jsh_material.Color)) as mName from jsh_depotitem inner join jsh_material " +
" on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId ="+ headerId); " on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId ="+ headerId);
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
@@ -164,7 +164,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException { public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select group_concat(CAST(dt.HeaderId AS CHAR)) as ids from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where m.`Name` "+ queryString.append("select group_concat(CAST(dt.HeaderId AS CHAR)) as ids from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where m.`Name` "+
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%' or m.Mfrs like '%" + materialParam + "%'"); " like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%' or m.Color like '%" + materialParam + "%'");
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }

View File

@@ -89,7 +89,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
workbook = Workbook.createWorkbook(os); workbook = Workbook.createWorkbook(os);
WritableSheet sheet = workbook.createSheet("信息报表", 0); WritableSheet sheet = workbook.createSheet("信息报表", 0);
//增加列头 //增加列头
String[] colunmName = {"品名","类型","型号","制造商","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"}; String[] colunmName = {"品名","类型","型号","颜色","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"};
for(int i = 0 ;i < colunmName.length;i ++) { for(int i = 0 ;i < colunmName.length;i ++) {
sheet.setColumnView(i, 10); sheet.setColumnView(i, 10);
sheet.addCell(new Label(i, 0, colunmName[i])); sheet.addCell(new Label(i, 0, colunmName[i]));
@@ -102,7 +102,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
sheet.addCell(new Label(j++,i, material.getName())); sheet.addCell(new Label(j++,i, material.getName()));
sheet.addCell(new Label(j++,i, material.getMaterialCategory().getName())); sheet.addCell(new Label(j++,i, material.getMaterialCategory().getName()));
sheet.addCell(new Label(j++,i, material.getModel() == null ?"": material.getModel())); sheet.addCell(new Label(j++,i, material.getModel() == null ?"": material.getModel()));
sheet.addCell(new Label(j++,i, material.getMfrs() == null ?"": material.getMfrs())); sheet.addCell(new Label(j++,i, material.getColor() == null ?"": material.getColor()));
sheet.addCell(new Label(j++,i, material.getStandard() == null ?"": material.getStandard())); sheet.addCell(new Label(j++,i, material.getStandard() == null ?"": material.getStandard()));
sheet.addCell(getLabelInfo(cellInfo,j++,i, material.getSafetyStock() == null ?"": material.getSafetyStock().toString(),material)); sheet.addCell(getLabelInfo(cellInfo,j++,i, material.getSafetyStock() == null ?"": material.getSafetyStock().toString(),material));
sheet.addCell(new Label(j++,i, material.getUnit() == null ?"": material.getUnit())); sheet.addCell(new Label(j++,i, material.getUnit() == null ?"": material.getUnit()));
@@ -242,7 +242,7 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
Log.infoFileSync("==================excel表格中第" + totalRow + "行的第 " + cellIndex + "列的值为" + cell.getStringCellValue()); Log.infoFileSync("==================excel表格中第" + totalRow + "行的第 " + cellIndex + "列的值为" + cell.getStringCellValue());
//每行中数据顺序 "品名","类型","型号","制造商","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态" //每行中数据顺序 "品名","类型","型号","颜色","规格","安全存量","单位","零售价","最低售价","预计采购价","批发价","备注","状态"
switch(cellIndex) { switch(cellIndex) {
case MaterialConstants.BusinessForExcel.EXCEL_NAME : case MaterialConstants.BusinessForExcel.EXCEL_NAME :
String materialName = cell.getStringCellValue(); String materialName = cell.getStringCellValue();
@@ -268,13 +268,13 @@ public class MaterialService extends BaseService<Material> implements MaterialIS
} }
material.setModel(model); material.setModel(model);
break; break;
case MaterialConstants.BusinessForExcel.EXCEL_MFRS : case MaterialConstants.BusinessForExcel.EXCEL_COLOR :
String mfrs = cell.getStringCellValue(); String color = cell.getStringCellValue();
if(null == mfrs || "".equals(mfrs)) { if(null == color || "".equals(color)) {
Log.errorFileSync(">>>>>>>>>>>>>>>>列表没有填写(制造商)信息"); Log.errorFileSync(">>>>>>>>>>>>>>>>列表没有填写(颜色)信息");
break; break;
} }
material.setMfrs(mfrs); material.setColor(color);
break; break;
case MaterialConstants.BusinessForExcel.EXCEL_STANDARD : case MaterialConstants.BusinessForExcel.EXCEL_STANDARD :
String standard = cell.getStringCellValue(); String standard = cell.getStringCellValue();

View File

@@ -32,9 +32,9 @@ public interface MaterialConstants
public static final int EXCEL_CATEGORY = 1; public static final int EXCEL_CATEGORY = 1;
/** /**
* 制造商 * 颜色
*/ */
public static final int EXCEL_MFRS = 2; public static final int EXCEL_COLOR = 2;
/** /**
* 型号 * 型号

View File

@@ -788,7 +788,7 @@
} }
} }
}, },
{ title: '品名(型号)(制造商)(包装)',field: 'MaterialId',width:230, { title: '品名(型号)(规格)(颜色)(包装)',field: 'MaterialId',width:230,
formatter:function(value,row,index){ formatter:function(value,row,index){
return row.MaterialName; return row.MaterialName;
}, },
@@ -1039,7 +1039,7 @@
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}, { title: '备注',field: 'Remark',editor:'validatebox',width:150},
{ 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},
{ title: '备注2',field: 'OtherField5',editor:'validatebox',hidden:true,width:60} { title: '备注2',field: 'OtherField5',editor:'validatebox',hidden:true,width:60}
]], ]],
@@ -1150,7 +1150,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:70}, { title: '单位',field: 'Unit',editor:'validatebox',width:70},
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:70}, { title: '数量',field: 'OperNumber',editor:'validatebox',width:70},
@@ -1163,7 +1163,7 @@
{ title: '备注',field: 'Remark',editor:'validatebox',width:150}, { title: '备注',field: 'Remark',editor:'validatebox',width:150},
{ 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},
{ title: '备注2',field: 'OtherField5',editor:'validatebox',hidden:true,width:60} { title: '备注2',field: 'OtherField5',editor:'validatebox',hidden:true,width:60}
]], ]],

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -35,9 +35,9 @@
<td> <td>
<input name="searchModel" id="searchModel" style="width:80px;"/> <input name="searchModel" id="searchModel" style="width:80px;"/>
</td> </td>
<td>制造商</td> <td>颜色</td>
<td> <td>
<input name="searchMfrs" id="searchMfrs" style="width:80px;"/> <input name="searchColor" id="searchColor" style="width:80px;"/>
</td> </td>
<td>类别:</td> <td>类别:</td>
<td> <td>
@@ -86,9 +86,9 @@
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td style="height:30px;">制造商</td> <td style="height:30px;">颜色</td>
<td style="padding:5px"> <td style="padding:5px">
<input name="Mfrs" id="Mfrs" class="easyui-validatebox" data-options="required:true,validType:'length[1,30]'" style="width: 180px;height: 20px"/> <input name="Color" id="Color" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/>
</td> </td>
<td>规格</td> <td>规格</td>
<td style="padding:5px"><input name="Standard" id="Standard" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/></td> <td style="padding:5px"><input name="Standard" id="Standard" class="easyui-validatebox" data-options="validType:'length[1,30]'" style="width: 180px;height: 20px"/></td>
@@ -503,7 +503,7 @@
var str = ''; var str = '';
var rowInfo = rec.Id + 'AaBb' + rec.Name+ 'AaBb' + rec.Model + 'AaBb' + rec.Color + 'AaBb' + rec.Unit + 'AaBb' + rec.RetailPrice var rowInfo = rec.Id + 'AaBb' + rec.Name+ 'AaBb' + rec.Model + 'AaBb' + rec.Color + 'AaBb' + rec.Unit + 'AaBb' + rec.RetailPrice
+ 'AaBb' + rec.LowPrice + 'AaBb' + rec.PresetPriceOne + 'AaBb' + rec.PresetPriceTwo + 'AaBb' + rec.Remark + 'AaBb' + rec.Standard + 'AaBb' + rec.LowPrice + 'AaBb' + rec.PresetPriceOne + 'AaBb' + rec.PresetPriceTwo + 'AaBb' + rec.Remark + 'AaBb' + rec.Standard
+ 'AaBb' + rec.Mfrs + 'AaBb' + rec.Packing + 'AaBb' + rec.SafetyStock + 'AaBb' + rec.CategoryId + 'AaBb' + rec.CategoryName + 'AaBb' + rec.Color + 'AaBb' + rec.Packing + 'AaBb' + rec.SafetyStock + 'AaBb' + rec.CategoryId + 'AaBb' + rec.CategoryName
+ 'AaBb' + rec.UnitId + 'AaBb' + rec.UnitName + 'AaBb' + rec.FirstOutUnit + 'AaBb' + rec.FirstInUnit; + 'AaBb' + rec.UnitId + 'AaBb' + rec.UnitName + 'AaBb' + rec.FirstOutUnit + 'AaBb' + rec.FirstInUnit;
if(1 == value) if(1 == value)
{ {
@@ -515,7 +515,7 @@
}, },
{ title: '品名',field: 'Name',width:80}, { title: '品名',field: 'Name',width:80},
{ title: '型号',field: 'Model',width:80}, { title: '型号',field: 'Model',width:80},
{ title: '制造商',field: 'Mfrs',width:150}, { title: '颜色',field: 'Color',width:80},
{ title: '规格',field: 'Standard',width:80}, { title: '规格',field: 'Standard',width:80},
{ title: '单位',field: 'Unit',width:60}, { title: '单位',field: 'Unit',width:60},
{ title: '安全存量',field: 'SafetyStock',width:90}, { title: '安全存量',field: 'SafetyStock',width:90},
@@ -872,10 +872,10 @@
//增加 //增加
var url; var url;
var materialID = 0; var materialID = 0;
//保存编辑前的名称/型号/制造商 //保存编辑前的名称/型号/颜色
var oldName = ""; var oldName = "";
var oldModel = ""; var oldModel = "";
var oldMfrs = ""; var oldColor = "";
var oldUnit = ""; var oldUnit = "";
var oldManyUnit = ""; var oldManyUnit = "";
@@ -901,7 +901,7 @@
$(".price-two").show(); $(".price-two").show();
oldName = ""; oldName = "";
oldModel = ""; oldModel = "";
oldMfrs = ""; oldColor = "";
oldUnit = ""; oldUnit = "";
oldManyUnit = ""; oldManyUnit = "";
materialID = 0; materialID = 0;
@@ -912,13 +912,13 @@
function checkIsExist() { function checkIsExist() {
var mName = $.trim($("#Name").val()); var mName = $.trim($("#Name").val());
var mModel = $.trim($("#Model").val()); var mModel = $.trim($("#Model").val());
var mMfrs = $.trim($("#Mfrs").val()); var mColor = $.trim($("#Color").val());
var mUnit = $.trim($("#Unit").val()); var mUnit = $.trim($("#Unit").val());
var mUnitId = $.trim($("#manyUnit").val()); var mUnitId = $.trim($("#manyUnit").val());
//表示是否存在 true == 存在 false = 不存在 //表示是否存在 true == 存在 false = 不存在
var flag = false; var flag = false;
//开始ajax名称检验不能重名(新增或编辑) //开始ajax名称检验不能重名(新增或编辑)
if(materialID==0 || (materialID!=0 && (mName != oldName || mModel != oldModel || mMfrs != oldMfrs || mUnit != oldUnit || mUnitId != oldManyUnit))) { if(materialID==0 || (materialID!=0 && (mName != oldName || mModel != oldModel || mColor != oldColor || mUnit != oldUnit || mUnitId != oldManyUnit))) {
$.ajax({ $.ajax({
type:"post", type:"post",
url: "<%=path%>/material/checkIsExist.action", url: "<%=path%>/material/checkIsExist.action",
@@ -928,7 +928,7 @@
MaterialID : materialID, MaterialID : materialID,
Name : mName, Name : mName,
Model: mModel, Model: mModel,
Mfrs: mMfrs, Color: mColor,
Unit: mUnit, Unit: mUnit,
UnitId: mUnitId UnitId: mUnitId
}), }),
@@ -1001,7 +1001,7 @@
data: ({ data: ({
CategoryId : parent, CategoryId : parent,
Name : $.trim($("#Name").val()), Name : $.trim($("#Name").val()),
Mfrs : $.trim($("#Mfrs").val()), Color : $.trim($("#Color").val()),
Packing : $.trim($("#Packing").val()), Packing : $.trim($("#Packing").val()),
SafetyStock : $.trim($("#SafetyStock").val()), SafetyStock : $.trim($("#SafetyStock").val()),
Model : $.trim($("#Model").val()), Model : $.trim($("#Model").val()),
@@ -1075,7 +1075,7 @@
$("#clientIp").val('<%=clientIp %>'); $("#clientIp").val('<%=clientIp %>');
$("#Name").focus().val(materialInfo[1]); $("#Name").focus().val(materialInfo[1]);
$("#Mfrs").focus().val(materialInfo[11]); $("#Color").focus().val(materialInfo[11]);
var categoryName = ""; //类型名称 var categoryName = ""; //类型名称
mId = materialInfo[14]; mId = materialInfo[14];
@@ -1191,7 +1191,7 @@
oldName = materialInfo[1]; oldName = materialInfo[1];
oldModel = materialInfo[2]; oldModel = materialInfo[2];
oldMfrs = materialInfo[11]; oldColor = materialInfo[11];
oldUnit = materialInfo[4]; oldUnit = materialInfo[4];
oldManyUnit = materialInfo[16]; oldManyUnit = materialInfo[16];
$('#materialDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑商品信息'); $('#materialDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑商品信息');
@@ -1240,7 +1240,7 @@
data: ({ data: ({
Name: $.trim($("#searchName").val()), Name: $.trim($("#searchName").val()),
Model: $.trim($("#searchModel").val()), Model: $.trim($("#searchModel").val()),
Mfrs: $.trim($("#searchMfrs").val()), Color: $.trim($("#searchColor").val()),
CategoryId:cid, CategoryId:cid,
CategoryIds:setCategoryId, CategoryIds:setCategoryId,
pageNo:pageNo, pageNo:pageNo,

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
</td> </td>
<td>商品信息:</td> <td>商品信息:</td>
<td> <td>
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,制造商" style="width:120px;"/> <input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号,颜色" style="width:120px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>