Commit 0aaeb724 authored by 鲁鑫's avatar 鲁鑫

品质异常报告增加单价和异常数量

parent c2f7a9b1
...@@ -335,6 +335,7 @@ function initClientGrid() { ...@@ -335,6 +335,7 @@ function initClientGrid() {
unitName: row.MEINS, unitName: row.MEINS,
currencyName: row.KOEIN, currencyName: row.KOEIN,
money: row.KWERT, money: row.KWERT,
price: row.NETWR,
sendDate: row.LFDAT sendDate: row.LFDAT
}); });
} }
...@@ -377,10 +378,19 @@ function initClientGrid() { ...@@ -377,10 +378,19 @@ function initClientGrid() {
//autoApplyNextEditor:false, //autoApplyNextEditor:false,
toolbar: clientToolbarOptions, toolbar: clientToolbarOptions,
onAfterEdit: function (item) { onAfterEdit: function (item) {
if (item.column.name == 'rmbMoney') { // if (item.column.name == 'rmbMoney') {
// countSum(clientGridManager.rows);
// var money = MathUtil.add(item.record.money, item.value);
// clientGridManager.updateRow(item.record, {totalMoney:money });
// }
//异常金额 = 异常数量 * 单价
if (item.column.name == "exceptionNumber"|| item.column.name == "price" ){
if (Public.isNotBlank(item.record.exceptionNumber) && Public.isNotBlank(item.record.price)){
clientGridManager.updateRow(item.record, {money: MathUtil.mul(item.record.exceptionNumber,item.record.price) });
//损失金额 = 行项目异常金额总和 + 赔付金额
countSum(clientGridManager.rows); countSum(clientGridManager.rows);
var money = MathUtil.add(item.record.money, item.value); }
clientGridManager.updateRow(item.record, {totalMoney:money });
} }
}, },
onAfterShowData() { onAfterShowData() {
...@@ -441,6 +451,9 @@ function getExceptionClientColumns(){ ...@@ -441,6 +451,9 @@ function getExceptionClientColumns(){
columns.push( columns.push(
{display: "数量", name: "PSMNG", width: "60", align: "left", type: "string" {display: "数量", name: "PSMNG", width: "60", align: "left", type: "string"
} ); } );
columns.push(
{display: "单价", name: "NETWR", width: "60", align: "left", type: "string"
} );
columns.push( columns.push(
{display: "单位", name: "MEINS", width: "60", align: "left", type: "string" {display: "单位", name: "MEINS", width: "60", align: "left", type: "string"
} ); } );
...@@ -507,7 +520,8 @@ function getClientGridColumns() { ...@@ -507,7 +520,8 @@ function getClientGridColumns() {
MEINS: "unitName", MEINS: "unitName",
KOEIN: "currencyName", KOEIN: "currencyName",
KWERT: "money", KWERT: "money",
LFDAT: "sendDate" LFDAT: "sendDate",
NETWR: "price"
} }
} }
} }
...@@ -525,6 +539,14 @@ function getClientGridColumns() { ...@@ -525,6 +539,14 @@ function getClientGridColumns() {
{display: "数量", name: "number", width: "100", align: "left", type: "string" {display: "数量", name: "number", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'} ,editor: {type: "text",mask: '9999999.999'}
} ); } );
columns.push(
{display: "异常数量", name: "exceptionNumber", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'}
} );
columns.push(
{display: "单价", name: "price", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'}
} );
columns.push( columns.push(
{display: "单位", name: "unitName", width: "80", align: "left", type: "string" {display: "单位", name: "unitName", width: "80", align: "left", type: "string"
,editor: {type: "text"} ,editor: {type: "text"}
...@@ -548,7 +570,7 @@ function getClientGridColumns() { ...@@ -548,7 +570,7 @@ function getClientGridColumns() {
} }
} ); } );
columns.push( columns.push(
{display: "金额", name: "money", width: "100", align: "left", type: "string" {display: "异常金额", name: "money", width: "100", align: "left", type: "string"
,editor: {type: "text",mask: '9999999.999'} ,editor: {type: "text",mask: '9999999.999'}
} ); } );
columns.push( columns.push(
...@@ -834,7 +856,7 @@ function getPurchaseGridColumns() { ...@@ -834,7 +856,7 @@ function getPurchaseGridColumns() {
editor: {type: "text", mask: '9999999.999'} editor: {type: "text", mask: '9999999.999'}
}, },
{ {
display: "损失金额", name: "totalMoney", width: "100", align: "left", type: "string" display: "损失金额", name: "totalMoney", width: "100", align: "left", type: "string"
} }
// { // {
// display: "出货日期", name: "sendDate", width: "140", align: "left", type: "date" // display: "出货日期", name: "sendDate", width: "140", align: "left", type: "date"
...@@ -850,7 +872,7 @@ function countSum(zrow) { ...@@ -850,7 +872,7 @@ function countSum(zrow) {
// var zrow=itemGridManager.rows; // var zrow=itemGridManager.rows;
var money = 0; var money = 0;
for (var r = 0; r < zrow.length; r++) { for (var r = 0; r < zrow.length; r++) {
money = MathUtil.add(zrow[r].rmbMoney, money); money = MathUtil.add(zrow[r].money, money);
} }
money = MathUtil.add($('#payMoney').val(), money); money = MathUtil.add($('#payMoney').val(), money);
// for (var x=0;x<row.length;x++){ // for (var x=0;x<row.length;x++){
......
...@@ -105,4 +105,10 @@ public class ExceptionReportItem extends AbstractEntity { ...@@ -105,4 +105,10 @@ public class ExceptionReportItem extends AbstractEntity {
//异常原因类型 用于区分是生产 2 还是供应商原材料的明细 1 //异常原因类型 用于区分是生产 2 还是供应商原材料的明细 1
@Column(name = "reason_type") @Column(name = "reason_type")
private String reasonType; private String reasonType;
/**
* 异常数量
*/
@Column(name = "exception_number")
private BigDecimal exceptionNumber;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment