优化库存报表
This commit is contained in:
@@ -149,7 +149,7 @@
|
|||||||
<td width="18%">零售价</td>
|
<td width="18%">零售价</td>
|
||||||
<td width="18%">最低售价</td>
|
<td width="18%">最低售价</td>
|
||||||
<td width="18%">预计采购价</td>
|
<td width="18%">预计采购价</td>
|
||||||
<td width="18%">批发价</td>
|
<td width="18%">销售价</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>基本单位</td>
|
<td>基本单位</td>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
class="easyui-validatebox"
|
class="easyui-validatebox"
|
||||||
data-options="validType:'length[1,30]'"
|
data-options="validType:'length[1,30]'"
|
||||||
style="width: 180px;height: 20px"/></td>
|
style="width: 180px;height: 20px"/></td>
|
||||||
<td>批发价</td>
|
<td>销售价</td>
|
||||||
<td style="padding:5px"><input name="PresetPriceTwo" id="PresetPriceTwo"
|
<td style="padding:5px"><input name="PresetPriceTwo" id="PresetPriceTwo"
|
||||||
class="easyui-validatebox"
|
class="easyui-validatebox"
|
||||||
data-options="validType:'length[1,30]'"
|
data-options="validType:'length[1,30]'"
|
||||||
@@ -467,6 +467,29 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//价格转换
|
||||||
|
function parsePrice(value, rec, type) {
|
||||||
|
var res = "";
|
||||||
|
if(rec.unit) {
|
||||||
|
res = value;
|
||||||
|
} else {
|
||||||
|
var ps = rec.pricestrategy;
|
||||||
|
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() {
|
function initTableData() {
|
||||||
//改变宽度和高度
|
//改变宽度和高度
|
||||||
@@ -513,7 +536,15 @@
|
|||||||
{title: '型号', field: 'model', width: 80},
|
{title: '型号', field: 'model', width: 80},
|
||||||
{title: '类别', field: 'categoryName', width: 80},
|
{title: '类别', field: 'categoryName', width: 80},
|
||||||
{title: '扩展信息', field: 'materialOther', width: 150},
|
{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: 'safetystock', width: 70},
|
||||||
{
|
{
|
||||||
title: '库存', field: 'stock', width: 70, formatter: function (value, rec) {
|
title: '库存', field: 'stock', width: 70, formatter: function (value, rec) {
|
||||||
@@ -522,10 +553,26 @@
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title: '零售价', field: 'retailprice', width: 60},
|
{title: '零售价', field: 'retailprice', width: 60,
|
||||||
{title: '最低售价', field: 'lowprice', width: 70},
|
formatter: function (value, rec) {
|
||||||
{title: '预计采购价', field: 'presetpriceone', width: 70},
|
return parsePrice(value, rec, "retailprice");
|
||||||
{title: '批发价', field: 'presetpricetwo', width: 70},
|
}
|
||||||
|
},
|
||||||
|
{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) {
|
title: '状态', field: 'enabled', width: 50, align: "center", formatter: function (value) {
|
||||||
return value ? "启用" : "禁用";
|
return value ? "启用" : "禁用";
|
||||||
|
|||||||
@@ -111,7 +111,16 @@
|
|||||||
{title: '名称', field: 'MaterialName', width: 60},
|
{title: '名称', field: 'MaterialName', width: 60},
|
||||||
{title: '型号', field: 'MaterialModel', width: 80},
|
{title: '型号', field: 'MaterialModel', width: 80},
|
||||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
{title: '单位', field: 'MaterialUnit', width: 80,
|
||||||
|
formatter: function (value, row) {
|
||||||
|
if(value) {
|
||||||
|
return value;
|
||||||
|
} else if(row.UName) {
|
||||||
|
var uName = row.UName;
|
||||||
|
return uName.substring(0,uName.indexOf(","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{title: '进货数量', field: 'InSum', width: 60},
|
{title: '进货数量', field: 'InSum', width: 60},
|
||||||
{title: '进货金额', field: 'InSumPrice', width: 60},
|
{title: '进货金额', field: 'InSumPrice', width: 60},
|
||||||
{title: '退货数量', field: 'OutSum', width: 60},
|
{title: '退货数量', field: 'OutSum', width: 60},
|
||||||
|
|||||||
@@ -110,15 +110,24 @@
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageList: [10, 50, 100],
|
pageList: [10, 50, 100],
|
||||||
columns: [[
|
columns: [[
|
||||||
{title: '名称', field: 'MaterialName', width: 60, align: "center"},
|
{title: '名称', field: 'MaterialName', width: 60},
|
||||||
{title: '型号', field: 'MaterialModel', width: 80, align: "center"},
|
{title: '型号', field: 'MaterialModel', width: 80},
|
||||||
{title: '扩展信息', field: 'MaterialOther', width: 150, align: "center"},
|
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||||
{title: '单位', field: 'MaterialUnit', width: 80, align: "center"},
|
{title: '单位', field: 'MaterialUnit', width: 80,
|
||||||
{title: '销售数量', field: 'OutSum', width: 60, align: "center"},
|
formatter: function (value, row) {
|
||||||
{title: '销售金额', field: 'OutSumPrice', width: 60, align: "center"},
|
if(value) {
|
||||||
{title: '退货数量', field: 'InSum', width: 60, align: "center"},
|
return value;
|
||||||
{title: '退货金额', field: 'InSumPrice', width: 60, align: "center"},
|
} else if(row.UName) {
|
||||||
{title: '实际销售金额', field: 'OutInSumPrice', width: 80, align: "center"}
|
var uName = row.UName;
|
||||||
|
return uName.substring(0,uName.indexOf(","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{title: '销售数量', field: 'OutSum', width: 60},
|
||||||
|
{title: '销售金额', field: 'OutSumPrice', width: 60},
|
||||||
|
{title: '退货数量', field: 'InSum', width: 60},
|
||||||
|
{title: '退货金额', field: 'InSumPrice', width: 60},
|
||||||
|
{title: '实际销售金额', field: 'OutInSumPrice', width: 80}
|
||||||
|
|
||||||
]],
|
]],
|
||||||
onLoadError: function () {
|
onLoadError: function () {
|
||||||
|
|||||||
@@ -445,6 +445,7 @@ public class DepotItemController {
|
|||||||
item.put("MaterialOther", materialOther);
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("MaterialColor", diEx.getMColor());
|
item.put("MaterialColor", diEx.getMColor());
|
||||||
item.put("MaterialUnit", diEx.getMaterialUnit());
|
item.put("MaterialUnit", diEx.getMaterialUnit());
|
||||||
|
item.put("UName", diEx.getUName());
|
||||||
item.put("InSum", InSum);
|
item.put("InSum", InSum);
|
||||||
item.put("OutSum", OutSum);
|
item.put("OutSum", OutSum);
|
||||||
item.put("InSumPrice", InSumPrice);
|
item.put("InSumPrice", InSumPrice);
|
||||||
@@ -510,6 +511,7 @@ public class DepotItemController {
|
|||||||
item.put("MaterialOther", materialOther);
|
item.put("MaterialOther", materialOther);
|
||||||
item.put("MaterialColor", diEx.getMColor());
|
item.put("MaterialColor", diEx.getMColor());
|
||||||
item.put("MaterialUnit", diEx.getMaterialUnit());
|
item.put("MaterialUnit", diEx.getMaterialUnit());
|
||||||
|
item.put("UName", diEx.getUName());
|
||||||
item.put("OutSum", OutSumRetail.add(OutSum));
|
item.put("OutSum", OutSumRetail.add(OutSum));
|
||||||
item.put("InSum", InSumRetail.add(InSum));
|
item.put("InSum", InSumRetail.add(InSum));
|
||||||
item.put("OutSumPrice", OutSumRetailPrice.add(OutSumPrice));
|
item.put("OutSumPrice", OutSumRetailPrice.add(OutSumPrice));
|
||||||
|
|||||||
Reference in New Issue
Block a user