从源更新
This commit is contained in:
@@ -15,13 +15,21 @@
|
||||
<script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="/js/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></script>
|
||||
<script src="/js/common/jsherp.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" data-options="fit:true" style="padding:1px;top:300px;" title="商品列表" iconCls="icon-list">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>类别:</td>
|
||||
<td>
|
||||
<input name="searchParentName" id="searchParentName" style="width: 100px;" readonly="readonly"/>
|
||||
<a href="javascript:void(0)" class="l-btn l-btn-plain" group="" style="height: 25px;" id="lookForSelectMaterialCategory">
|
||||
<span class="l-btn-left"><span class="l-btn-text icon-search l-btn-icon-left"></span></span></a>
|
||||
<input name="searchParentId" id="searchParentId" type="hidden"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>品名:</td>
|
||||
<td>
|
||||
<input name="searchName" id="searchName" style="width:80px;"/>
|
||||
@@ -38,11 +46,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 数据显示table -->
|
||||
<div id="tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="商品列表" iconCls="icon-list"
|
||||
collapsible="true" closable="false">
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
@@ -86,8 +89,8 @@
|
||||
<td style="width:80px;">序列号</td>
|
||||
<td style="padding:5px;width:180px;">
|
||||
<select name="EnableSerialNumber" id="EnableSerialNumber" style="width: 180px;height: 20px">
|
||||
<option value="1">启用</option>
|
||||
<option value="0">禁用</option>
|
||||
<option value="1">有</option>
|
||||
<option value="0">无</option>
|
||||
</select>
|
||||
</td>
|
||||
<td></td>
|
||||
@@ -141,7 +144,7 @@
|
||||
<td width="18%">零售价</td>
|
||||
<td width="18%">最低售价</td>
|
||||
<td width="18%">预计采购价</td>
|
||||
<td width="18%">批发价</td>
|
||||
<td width="18%">销售价</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>基本单位</td>
|
||||
@@ -179,7 +182,7 @@
|
||||
class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/></td>
|
||||
<td>批发价</td>
|
||||
<td>销售价</td>
|
||||
<td style="padding:5px"><input name="PresetPriceTwo" id="PresetPriceTwo"
|
||||
class="easyui-validatebox"
|
||||
data-options="validType:'length[1,30]'"
|
||||
@@ -473,6 +476,31 @@
|
||||
});
|
||||
}
|
||||
|
||||
//价格转换
|
||||
function parsePrice(value, rec, type) {
|
||||
var res = "";
|
||||
if(rec.unit) {
|
||||
res = value;
|
||||
} else {
|
||||
var ps = rec.pricestrategy;
|
||||
if(ps) {
|
||||
var arr = JSON.parse(ps);
|
||||
var basic = "";
|
||||
if(type == "lowprice") {
|
||||
basic = arr[0].basic.LowPrice;
|
||||
} else if(type == "presetpriceone") {
|
||||
basic = arr[0].basic.PresetPriceOne;
|
||||
} else if(type == "presetpricetwo") {
|
||||
basic = arr[0].basic.PresetPriceTwo;
|
||||
} else if(type == "retailprice") {
|
||||
basic = arr[0].basic.RetailPrice;
|
||||
}
|
||||
res = basic;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
//改变宽度和高度
|
||||
@@ -526,7 +554,15 @@
|
||||
{title: '型号', field: 'model', width: 80},
|
||||
{title: '类别', field: 'categoryName', width: 80},
|
||||
{title: '扩展信息', field: 'materialOther', width: 150},
|
||||
{title: '单位', field: 'unit', width: 60},
|
||||
{title: '单位', field: 'unit', width: 100,
|
||||
formatter: function (value, rec) {
|
||||
if(value) {
|
||||
return value;
|
||||
} else {
|
||||
return rec.unitName;
|
||||
}
|
||||
}
|
||||
},
|
||||
{title: '安全存量', field: 'safetystock', width: 70},
|
||||
{
|
||||
title: '库存', field: 'abc', width: 70, formatter: function (value, rec) {
|
||||
@@ -566,10 +602,26 @@
|
||||
return "<span class='class-" + rec.id + "'>" + thisStock + "</span>";
|
||||
}
|
||||
},
|
||||
{title: '零售价', field: 'retailprice', width: 60},
|
||||
{title: '最低售价', field: 'lowprice', width: 70},
|
||||
{title: '预计采购价', field: 'presetpriceone', width: 70},
|
||||
{title: '批发价', field: 'presetpricetwo', width: 70},
|
||||
{title: '零售价', field: 'retailprice', width: 60,
|
||||
formatter: function (value, rec) {
|
||||
return parsePrice(value, rec, "retailprice");
|
||||
}
|
||||
},
|
||||
{title: '最低售价', field: 'lowprice', width: 70,
|
||||
formatter: function (value, rec) {
|
||||
return parsePrice(value, rec, "lowprice");
|
||||
}
|
||||
},
|
||||
{title: '预计采购价', field: 'presetpriceone', width: 70,
|
||||
formatter: function (value, rec) {
|
||||
return parsePrice(value, rec, "presetpriceone");
|
||||
}
|
||||
},
|
||||
{title: '销售价', field: 'presetpricetwo', width: 70,
|
||||
formatter: function (value, rec) {
|
||||
return parsePrice(value, rec, "presetpricetwo");
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '状态', field: 'enabled', width: 50, align: "center", formatter: function (value) {
|
||||
return value ? "启用" : "禁用";
|
||||
@@ -577,7 +629,7 @@
|
||||
},
|
||||
{
|
||||
title: '序列号', field: 'enableserialnumber', width: 70, align: "center", formatter: function (value) {
|
||||
return value=='1' ? "启用" : "禁用";
|
||||
return value=='1' ? "有" : "无";
|
||||
}
|
||||
}
|
||||
]],
|
||||
@@ -641,6 +693,7 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
dgResize();
|
||||
showMaterialDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
@@ -668,8 +721,7 @@
|
||||
{
|
||||
title: '单据编号', field: 'Number', width: 150,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.Number + "','../materials/bill_detail.html?n=" + row.Number + "&type=" + row.Type + "','')\">"
|
||||
+ row.Number + "</a>";
|
||||
return '<a class="n-link" onclick="turnBillDetailPage(\'' + row.Number + '\''+',\'' + row.Type + '\');">' + row.Number + '</a>';
|
||||
}
|
||||
},
|
||||
{title: '类型', field: 'Type', width: 100},
|
||||
@@ -1466,6 +1518,8 @@
|
||||
click: function () {
|
||||
$("#searchName").val("");
|
||||
setCategoryId = "1";
|
||||
$("#searchModel").val("");
|
||||
types = ""; //清空类别
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user