Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
a4fb41c1
Commit
a4fb41c1
authored
Oct 26, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
51730006
98f78e4d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
452 additions
and
11 deletions
+452
-11
HGCG003B.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG003B.java
+115
-0
HGCG003A.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003A.xml
+29
-4
HGCW013.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW013.java
+120
-0
ServiceHGCW012.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
+31
-2
HGCW012A.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012A.xml
+7
-1
HGCW012A.js
src/main/webapp/HG/CW/HGCW012A.js
+150
-4
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG003B.java
View file @
a4fb41c1
...
@@ -72,6 +72,12 @@ public class HGCG003B extends DaoEPBase {
...
@@ -72,6 +72,12 @@ public class HGCG003B extends DaoEPBase {
public
static
final
String
FIELD_CALCULATION_METHOD
=
"calculationMethod"
;
/* 计算方式 0-数量乘单价 1-重量乘单价*/
public
static
final
String
FIELD_CALCULATION_METHOD
=
"calculationMethod"
;
/* 计算方式 0-数量乘单价 1-重量乘单价*/
public
static
final
String
FIELD_CANCEL_AMOUNT
=
"cancelAmount"
;
/* 核销金额*/
public
static
final
String
FIELD_CANCEL_AMOUNT
=
"cancelAmount"
;
/* 核销金额*/
public
static
final
String
FIELD_UN_CANCEL_AMOUNT
=
"unCancelAmount"
;
/* 未核销金额*/
public
static
final
String
FIELD_UN_CANCEL_AMOUNT
=
"unCancelAmount"
;
/* 未核销金额*/
public
static
final
String
FIELD_INVOICE_QTY
=
"invoiceQty"
;
/* 收票数量*/
public
static
final
String
FIELD_INVOICE_WEIGHT
=
"invoiceWeight"
;
/* 收票重量*/
public
static
final
String
FIELD_INVOICE_AMOUNT
=
"invoiceAmount"
;
/* 收票金额*/
public
static
final
String
FIELD_INVOICE_REMAINING_QTY
=
"invoiceRemainingQty"
;
/* 收票剩余数量*/
public
static
final
String
FIELD_INVOICE_REMAINING_WEIGHT
=
"invoiceRemainingWeight"
;
/* 收票剩余重量*/
public
static
final
String
FIELD_INVOICE_REMAINING_AMOUNT
=
"invoiceRemainingAmount"
;
/* 收票剩余金额*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
@@ -174,6 +180,12 @@ public class HGCG003B extends DaoEPBase {
...
@@ -174,6 +180,12 @@ public class HGCG003B extends DaoEPBase {
private
Integer
calculationMethod
=
0
;
/* 计算方式 0-数量乘单价 1-重量乘单价*/
private
Integer
calculationMethod
=
0
;
/* 计算方式 0-数量乘单价 1-重量乘单价*/
private
BigDecimal
cancelAmount
=
new
BigDecimal
(
"0"
);
/* 核销金额*/
private
BigDecimal
cancelAmount
=
new
BigDecimal
(
"0"
);
/* 核销金额*/
private
BigDecimal
unCancelAmount
=
new
BigDecimal
(
"0"
);
/* 未核销金额*/
private
BigDecimal
unCancelAmount
=
new
BigDecimal
(
"0"
);
/* 未核销金额*/
private
BigDecimal
invoiceQty
=
new
BigDecimal
(
"0"
);
/* 收票数量*/
private
BigDecimal
invoiceWeight
=
new
BigDecimal
(
"0"
);
/* 收票重量*/
private
BigDecimal
invoiceAmount
=
new
BigDecimal
(
"0"
);
/* 收票金额*/
private
BigDecimal
invoiceRemainingQty
=
new
BigDecimal
(
"0"
);
/* 收票剩余数量*/
private
BigDecimal
invoiceRemainingWeight
=
new
BigDecimal
(
"0"
);
/* 收票剩余重量*/
private
BigDecimal
invoiceRemainingAmount
=
new
BigDecimal
(
"0"
);
/* 收票剩余金额*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -426,6 +438,49 @@ public class HGCG003B extends DaoEPBase {
...
@@ -426,6 +438,49 @@ public class HGCG003B extends DaoEPBase {
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"未核销金额"
);
eiColumn
.
setDescName
(
"未核销金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"收票金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_REMAINING_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票剩余数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_REMAINING_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票剩余重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_REMAINING_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"收票剩余金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -1188,6 +1243,54 @@ public class HGCG003B extends DaoEPBase {
...
@@ -1188,6 +1243,54 @@ public class HGCG003B extends DaoEPBase {
this
.
contractLineNo
=
contractLineNo
;
this
.
contractLineNo
=
contractLineNo
;
}
}
public
BigDecimal
getInvoiceQty
()
{
return
invoiceQty
;
}
public
void
setInvoiceQty
(
BigDecimal
invoiceQty
)
{
this
.
invoiceQty
=
invoiceQty
;
}
public
BigDecimal
getInvoiceWeight
()
{
return
invoiceWeight
;
}
public
void
setInvoiceWeight
(
BigDecimal
invoiceWeight
)
{
this
.
invoiceWeight
=
invoiceWeight
;
}
public
BigDecimal
getInvoiceAmount
()
{
return
invoiceAmount
;
}
public
void
setInvoiceAmount
(
BigDecimal
invoiceAmount
)
{
this
.
invoiceAmount
=
invoiceAmount
;
}
public
BigDecimal
getInvoiceRemainingQty
()
{
return
invoiceRemainingQty
;
}
public
void
setInvoiceRemainingQty
(
BigDecimal
invoiceRemainingQty
)
{
this
.
invoiceRemainingQty
=
invoiceRemainingQty
;
}
public
BigDecimal
getInvoiceRemainingWeight
()
{
return
invoiceRemainingWeight
;
}
public
void
setInvoiceRemainingWeight
(
BigDecimal
invoiceRemainingWeight
)
{
this
.
invoiceRemainingWeight
=
invoiceRemainingWeight
;
}
public
BigDecimal
getInvoiceRemainingAmount
()
{
return
invoiceRemainingAmount
;
}
public
void
setInvoiceRemainingAmount
(
BigDecimal
invoiceRemainingAmount
)
{
this
.
invoiceRemainingAmount
=
invoiceRemainingAmount
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -1246,6 +1349,12 @@ public class HGCG003B extends DaoEPBase {
...
@@ -1246,6 +1349,12 @@ public class HGCG003B extends DaoEPBase {
setCalculationMethod
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CALCULATION_METHOD
)),
calculationMethod
));
setCalculationMethod
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CALCULATION_METHOD
)),
calculationMethod
));
setCancelAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CANCEL_AMOUNT
)),
cancelAmount
));
setCancelAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CANCEL_AMOUNT
)),
cancelAmount
));
setUnCancelAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UN_CANCEL_AMOUNT
)),
unCancelAmount
));
setUnCancelAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UN_CANCEL_AMOUNT
)),
unCancelAmount
));
setInvoiceQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_QTY
)),
invoiceQty
));
setInvoiceWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_WEIGHT
)),
invoiceWeight
));
setInvoiceAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_AMOUNT
)),
invoiceAmount
));
setInvoiceRemainingQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_REMAINING_QTY
)),
invoiceRemainingQty
));
setInvoiceRemainingWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_REMAINING_WEIGHT
)),
invoiceRemainingWeight
));
setInvoiceRemainingAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_REMAINING_AMOUNT
)),
invoiceRemainingAmount
));
}
}
/**
/**
...
@@ -1305,6 +1414,12 @@ public class HGCG003B extends DaoEPBase {
...
@@ -1305,6 +1414,12 @@ public class HGCG003B extends DaoEPBase {
map
.
put
(
FIELD_CALCULATION_METHOD
,
StringUtils
.
toString
(
calculationMethod
,
eiMetadata
.
getMeta
(
FIELD_CALCULATION_METHOD
)));
map
.
put
(
FIELD_CALCULATION_METHOD
,
StringUtils
.
toString
(
calculationMethod
,
eiMetadata
.
getMeta
(
FIELD_CALCULATION_METHOD
)));
map
.
put
(
FIELD_CANCEL_AMOUNT
,
StringUtils
.
toString
(
cancelAmount
,
eiMetadata
.
getMeta
(
FIELD_CANCEL_AMOUNT
)));
map
.
put
(
FIELD_CANCEL_AMOUNT
,
StringUtils
.
toString
(
cancelAmount
,
eiMetadata
.
getMeta
(
FIELD_CANCEL_AMOUNT
)));
map
.
put
(
FIELD_UN_CANCEL_AMOUNT
,
StringUtils
.
toString
(
unCancelAmount
,
eiMetadata
.
getMeta
(
FIELD_UN_CANCEL_AMOUNT
)));
map
.
put
(
FIELD_UN_CANCEL_AMOUNT
,
StringUtils
.
toString
(
unCancelAmount
,
eiMetadata
.
getMeta
(
FIELD_UN_CANCEL_AMOUNT
)));
map
.
put
(
FIELD_INVOICE_QTY
,
StringUtils
.
toString
(
invoiceQty
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_QTY
)));
map
.
put
(
FIELD_INVOICE_WEIGHT
,
StringUtils
.
toString
(
invoiceWeight
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_WEIGHT
)));
map
.
put
(
FIELD_INVOICE_AMOUNT
,
StringUtils
.
toString
(
invoiceAmount
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_AMOUNT
)));
map
.
put
(
FIELD_INVOICE_REMAINING_QTY
,
StringUtils
.
toString
(
invoiceRemainingQty
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_REMAINING_QTY
)));
map
.
put
(
FIELD_INVOICE_REMAINING_WEIGHT
,
StringUtils
.
toString
(
invoiceRemainingWeight
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_REMAINING_WEIGHT
)));
map
.
put
(
FIELD_INVOICE_REMAINING_AMOUNT
,
StringUtils
.
toString
(
invoiceRemainingAmount
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_REMAINING_AMOUNT
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003A.xml
View file @
a4fb41c1
...
@@ -50,7 +50,13 @@
...
@@ -50,7 +50,13 @@
PROJ_NAME as "projName",
<!-- 项目名称 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
CALCULATION_METHOD as "calculationMethod",
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
CALCULATION_METHOD as "calculationMethod",
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
CANCEL_AMOUNT as "cancelAmount",
CANCEL_AMOUNT as "cancelAmount",
UN_CANCEL_AMOUNT as "unCancelAmount"
UN_CANCEL_AMOUNT as "unCancelAmount",
INVOICE_QTY as "invoiceQty",
INVOICE_WEIGHT as "invoiceWeight",
INVOICE_AMOUNT as "invoiceAmount",
INVOICE_REMAINING_QTY as "invoiceRemainingQty",
INVOICE_REMAINING_WEIGHT as "invoiceRemainingWeight",
INVOICE_REMAINING_AMOUNT as "invoiceRemainingAmount"
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -273,7 +279,13 @@
...
@@ -273,7 +279,13 @@
PROJ_NAME,
<!-- 项目名称 -->
PROJ_NAME,
<!-- 项目名称 -->
CALCULATION_METHOD,
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
CALCULATION_METHOD,
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
CANCEL_AMOUNT,
CANCEL_AMOUNT,
UN_CANCEL_AMOUNT
UN_CANCEL_AMOUNT,
INVOICE_QTY,
INVOICE_WEIGHT,
INVOICE_AMOUNT,
INVOICE_REMAINING_QTY,
INVOICE_REMAINING_WEIGHT,
INVOICE_REMAINING_AMOUNT
) VALUES (
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#companyCode#, #companyName#, #receiveDate#, #receiveNo#, #receiveLineNo#, #planNo#,
#companyCode#, #companyName#, #receiveDate#, #receiveNo#, #receiveLineNo#, #planNo#,
...
@@ -282,7 +294,8 @@
...
@@ -282,7 +294,8 @@
#material#, #unit#, #length#, #width#, #thick#, #receiveQty#, #deliverQty#,
#material#, #unit#, #length#, #width#, #thick#, #receiveQty#, #deliverQty#,
#depositQty#, #receiveUnitWeight#, #receiveWeight#, #status#, #price#, #amount#,
#depositQty#, #receiveUnitWeight#, #receiveWeight#, #status#, #price#, #amount#,
#taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail#, #primaryId#,
#taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail#, #primaryId#,
#isInvoicing#, #projCode#, #projName#, #calculationMethod#, #cancelAmount#, #unCancelAmount#
#isInvoicing#, #projCode#, #projName#, #calculationMethod#, #cancelAmount#, #unCancelAmount#,
#invoiceQty#, #invoiceWeight#, #invoiceAmount#, #invoiceRemainingQty#, #invoiceRemainingWeight#, #invoiceRemainingAmount#
)
)
</insert>
</insert>
...
@@ -327,6 +340,12 @@
...
@@ -327,6 +340,12 @@
IS_INVOICING = #isInvoicing#,
IS_INVOICING = #isInvoicing#,
CANCEL_AMOUNT = #cancelAmount#,
CANCEL_AMOUNT = #cancelAmount#,
UN_CANCEL_AMOUNT = #unCancelAmount#,
UN_CANCEL_AMOUNT = #unCancelAmount#,
INVOICE_QTY = #invoiceQty#,
INVOICE_WEIGHT = #invoiceWeight#,
INVOICE_AMOUNT = #invoiceAmount#,
INVOICE_REMAINING_QTY = #invoiceRemainingQty#,
INVOICE_REMAINING_WEIGHT = #invoiceRemainingWeight#,
INVOICE_REMAINING_AMOUNT = #invoiceRemainingAmount#,
<include
refid=
"updateRevise"
/>
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
WHERE ID = #id#
</update>
</update>
...
@@ -418,7 +437,13 @@
...
@@ -418,7 +437,13 @@
b.PUR_USER_ID as "purUserId",
<!-- 采购员 -->
b.PUR_USER_ID as "purUserId",
<!-- 采购员 -->
b.PUR_USER_NAME as "purUserName",
<!-- 采购员名称 -->
b.PUR_USER_NAME as "purUserName",
<!-- 采购员名称 -->
a.CANCEL_AMOUNT as "cancelAmount",
a.CANCEL_AMOUNT as "cancelAmount",
a.UN_CANCEL_AMOUNT as "unCancelAmount"
a.UN_CANCEL_AMOUNT as "unCancelAmount",
a.INVOICE_QTY as "invoiceQty",
a.INVOICE_WEIGHT as "invoiceWeight",
a.INVOICE_AMOUNT as "invoiceAmount",
a.INVOICE_REMAINING_QTY as "invoiceRemainingQty",
a.INVOICE_REMAINING_WEIGHT as "invoiceRemainingWeight",
a.INVOICE_REMAINING_AMOUNT as "invoiceRemainingAmount"
FROM ${hggpSchema}.HGCG003A a
FROM ${hggpSchema}.HGCG003A a
LEFT JOIN ${hggpSchema}.HGCG003 b ON a.PRIMARY_ID = b.id
LEFT JOIN ${hggpSchema}.HGCG003 b ON a.PRIMARY_ID = b.id
WHERE 1=1
WHERE 1=1
...
...
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW013.java
View file @
a4fb41c1
...
@@ -51,6 +51,14 @@ public class HGCW013 extends DaoEPBase {
...
@@ -51,6 +51,14 @@ public class HGCW013 extends DaoEPBase {
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_CONTRACT_NO
=
"contractNo"
;
/* 合同号*/
public
static
final
String
FIELD_CONTRACT_NO
=
"contractNo"
;
/* 合同号*/
//页面取值字段
public
static
final
String
FIELD_SAVE_INVOICE_QTY
=
"saveInvoiceQty"
;
/* 收票数量*/
public
static
final
String
FIELD_SAVE_INVOICE_WEIGHT
=
"saveInvoiceWeight"
;
/* 收票重量*/
public
static
final
String
FIELD_SAVE_INVOICE_AMOUNT
=
"saveInvoiceAmount"
;
/* 收票金额*/
public
static
final
String
FIELD_INVOICE_REMAINING_QTY
=
"invoiceRemainingQty"
;
/* 收票剩余数量*/
public
static
final
String
FIELD_INVOICE_REMAINING_WEIGHT
=
"invoiceRemainingWeight"
;
/* 收票剩余重量*/
public
static
final
String
FIELD_INVOICE_REMAINING_AMOUNT
=
"invoiceRemainingAmount"
;
/* 收票剩余金额*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_MAIN_ID
=
"MAIN_ID"
;
/* 主表ID*/
public
static
final
String
COL_MAIN_ID
=
"MAIN_ID"
;
/* 主表ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
@@ -104,6 +112,14 @@ public class HGCW013 extends DaoEPBase {
...
@@ -104,6 +112,14 @@ public class HGCW013 extends DaoEPBase {
private
String
spec
=
" "
;
/* 规格*/
private
String
spec
=
" "
;
/* 规格*/
private
String
contractNo
=
" "
;
/* 合同号*/
private
String
contractNo
=
" "
;
/* 合同号*/
//页面取值字段
private
BigDecimal
saveInvoiceQty
=
new
BigDecimal
(
"0"
);
/* 收票数量*/
private
BigDecimal
saveInvoiceWeight
=
new
BigDecimal
(
"0"
);
/* 收票重量*/
private
BigDecimal
saveInvoiceAmount
=
new
BigDecimal
(
"0"
);
/* 收票金额*/
private
BigDecimal
invoiceRemainingQty
=
new
BigDecimal
(
"0"
);
/* 收票剩余数量*/
private
BigDecimal
invoiceRemainingWeight
=
new
BigDecimal
(
"0"
);
/* 收票剩余重量*/
private
BigDecimal
invoiceRemainingAmount
=
new
BigDecimal
(
"0"
);
/* 收票剩余金额*/
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
...
@@ -213,6 +229,48 @@ public class HGCW013 extends DaoEPBase {
...
@@ -213,6 +229,48 @@ public class HGCW013 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_NO
);
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_NO
);
eiColumn
.
setDescName
(
"合同号"
);
eiColumn
.
setDescName
(
"合同号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SAVE_INVOICE_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SAVE_INVOICE_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SAVE_INVOICE_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"收票金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_REMAINING_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票剩余数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_REMAINING_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"收票剩余重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVOICE_REMAINING_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"收票剩余金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -576,6 +634,54 @@ public class HGCW013 extends DaoEPBase {
...
@@ -576,6 +634,54 @@ public class HGCW013 extends DaoEPBase {
this
.
contractNo
=
contractNo
;
this
.
contractNo
=
contractNo
;
}
}
public
BigDecimal
getSaveInvoiceQty
()
{
return
saveInvoiceQty
;
}
public
void
setSaveInvoiceQty
(
BigDecimal
saveInvoiceQty
)
{
this
.
saveInvoiceQty
=
saveInvoiceQty
;
}
public
BigDecimal
getSaveInvoiceWeight
()
{
return
saveInvoiceWeight
;
}
public
void
setSaveInvoiceWeight
(
BigDecimal
saveInvoiceWeight
)
{
this
.
saveInvoiceWeight
=
saveInvoiceWeight
;
}
public
BigDecimal
getSaveInvoiceAmount
()
{
return
saveInvoiceAmount
;
}
public
void
setSaveInvoiceAmount
(
BigDecimal
saveInvoiceAmount
)
{
this
.
saveInvoiceAmount
=
saveInvoiceAmount
;
}
public
BigDecimal
getInvoiceRemainingQty
()
{
return
invoiceRemainingQty
;
}
public
void
setInvoiceRemainingQty
(
BigDecimal
invoiceRemainingQty
)
{
this
.
invoiceRemainingQty
=
invoiceRemainingQty
;
}
public
BigDecimal
getInvoiceRemainingWeight
()
{
return
invoiceRemainingWeight
;
}
public
void
setInvoiceRemainingWeight
(
BigDecimal
invoiceRemainingWeight
)
{
this
.
invoiceRemainingWeight
=
invoiceRemainingWeight
;
}
public
BigDecimal
getInvoiceRemainingAmount
()
{
return
invoiceRemainingAmount
;
}
public
void
setInvoiceRemainingAmount
(
BigDecimal
invoiceRemainingAmount
)
{
this
.
invoiceRemainingAmount
=
invoiceRemainingAmount
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -609,6 +715,13 @@ public class HGCW013 extends DaoEPBase {
...
@@ -609,6 +715,13 @@ public class HGCW013 extends DaoEPBase {
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setContractNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_NO
)),
contractNo
));
setContractNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_NO
)),
contractNo
));
//页面取值字段
setSaveInvoiceQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SAVE_INVOICE_QTY
)),
saveInvoiceQty
));
setSaveInvoiceWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SAVE_INVOICE_WEIGHT
)),
saveInvoiceWeight
));
setSaveInvoiceAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SAVE_INVOICE_AMOUNT
)),
saveInvoiceAmount
));
setInvoiceRemainingQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_REMAINING_QTY
)),
invoiceRemainingQty
));
setInvoiceRemainingWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_REMAINING_WEIGHT
)),
invoiceRemainingWeight
));
setInvoiceRemainingAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVOICE_REMAINING_AMOUNT
)),
invoiceRemainingAmount
));
}
}
/**
/**
...
@@ -644,6 +757,13 @@ public class HGCW013 extends DaoEPBase {
...
@@ -644,6 +757,13 @@ public class HGCW013 extends DaoEPBase {
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_CONTRACT_NO
,
StringUtils
.
toString
(
contractNo
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_NO
)));
map
.
put
(
FIELD_CONTRACT_NO
,
StringUtils
.
toString
(
contractNo
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_NO
)));
map
.
put
(
FIELD_SAVE_INVOICE_QTY
,
StringUtils
.
toString
(
saveInvoiceQty
,
eiMetadata
.
getMeta
(
FIELD_SAVE_INVOICE_QTY
)));
map
.
put
(
FIELD_SAVE_INVOICE_WEIGHT
,
StringUtils
.
toString
(
saveInvoiceWeight
,
eiMetadata
.
getMeta
(
FIELD_SAVE_INVOICE_WEIGHT
)));
map
.
put
(
FIELD_SAVE_INVOICE_AMOUNT
,
StringUtils
.
toString
(
saveInvoiceAmount
,
eiMetadata
.
getMeta
(
FIELD_SAVE_INVOICE_AMOUNT
)));
map
.
put
(
FIELD_INVOICE_REMAINING_QTY
,
StringUtils
.
toString
(
invoiceRemainingQty
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_REMAINING_QTY
)));
map
.
put
(
FIELD_INVOICE_REMAINING_WEIGHT
,
StringUtils
.
toString
(
invoiceRemainingWeight
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_REMAINING_WEIGHT
)));
map
.
put
(
FIELD_INVOICE_REMAINING_AMOUNT
,
StringUtils
.
toString
(
invoiceRemainingAmount
,
eiMetadata
.
getMeta
(
FIELD_INVOICE_REMAINING_AMOUNT
)));
return
map
;
return
map
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
View file @
a4fb41c1
...
@@ -12,11 +12,13 @@ import com.baosight.hggp.hg.cg.constant.HgCgConst;
...
@@ -12,11 +12,13 @@ import com.baosight.hggp.hg.cg.constant.HgCgConst;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.domain.HGCG003B
;
import
com.baosight.hggp.hg.cg.domain.HGCG003B
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -408,17 +410,44 @@ public class ServiceHGCW012 extends ServiceBase {
...
@@ -408,17 +410,44 @@ public class ServiceHGCW012 extends ServiceBase {
//hgcw012.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
//hgcw012.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
DaoUtils
.
insert
(
HGCW012
.
INSERT
,
hgcw012
);
DaoUtils
.
insert
(
HGCW012
.
INSERT
,
hgcw012
);
List
<
HGCG003B
>
hgcg003BList
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGCG003B
.
class
);
Map
<
Long
,
HGCG003B
>
dbCg003BMap
=
HGCGUtils
.
HgCg003B
.
lockGetDataEp
(
hgcg003BList
);
//生成明细表
//生成明细表
for
(
HGCW013
hgcw013
:
hgcw013List
)
{
for
(
HGCW013
hgcw013
:
hgcw013List
)
{
HGCG003B
hgcg003B
=
dbCg003BMap
.
get
(
hgcw013
.
getId
());
hgcw013
.
setMainId
(
hgcw012
.
getId
());
hgcw013
.
setMainId
(
hgcw012
.
getId
());
//跟新采购收票状态
//跟新采购收票状态
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
HGCG003B
.
FIELD_RECEIVE_NO
,
hgcw013
.
getSettlementNumber
());
paramMap
.
put
(
HGCG003B
.
FIELD_RECEIVE_NO
,
hgcw013
.
getSettlementNumber
());
paramMap
.
put
(
HGCG003B
.
FIELD_IS_INVOICING
,
HGConstant
.
CgIsInvoicing
.
S_
1
);
paramMap
.
put
(
HGCG003B
.
FIELD_IS_INVOICING
,
HGConstant
.
CgIsInvoicing
.
S_
0
);
paramMap
.
put
(
HGCG003B
.
FIELD_CANCEL_AMOUNT
,
hgcw013
.
getTotalContractPriceIncluding
());
paramMap
.
put
(
HGCG003B
.
FIELD_CANCEL_AMOUNT
,
hgcw013
.
getTotalContractPriceIncluding
());
paramMap
.
put
(
HGCG003B
.
FIELD_UN_CANCEL_AMOUNT
,
0
);
paramMap
.
put
(
HGCG003B
.
FIELD_UN_CANCEL_AMOUNT
,
0
);
paramMap
.
put
(
HGCG003B
.
FIELD_ID
,
hgcw013
.
getId
());
paramMap
.
put
(
HGCG003B
.
FIELD_ID
,
hgcw013
.
getId
());
if
(
Objects
.
nonNull
(
hgcg003B
)){
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_QTY
,
hgcg003B
.
getInvoiceQty
().
add
(
hgcw013
.
getSaveInvoiceQty
()));
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_WEIGHT
,
hgcg003B
.
getInvoiceWeight
().
add
(
hgcw013
.
getSaveInvoiceWeight
()));
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_AMOUNT
,
hgcg003B
.
getInvoiceAmount
().
add
(
hgcw013
.
getSaveInvoiceAmount
()));
if
(
hgcg003B
.
getInvoiceRemainingQty
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_REMAINING_QTY
,
hgcg003B
.
getInvoiceRemainingQty
().
subtract
(
hgcw013
.
getSaveInvoiceQty
()));
}
else
{
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_REMAINING_QTY
,
hgcg003B
.
getReceiveQty
().
subtract
(
hgcw013
.
getSaveInvoiceQty
()));
}
if
(
hgcg003B
.
getInvoiceRemainingWeight
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_REMAINING_WEIGHT
,
hgcg003B
.
getInvoiceRemainingWeight
().
subtract
(
hgcw013
.
getSaveInvoiceWeight
()));
}
else
{
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_REMAINING_WEIGHT
,
hgcg003B
.
getReceiveWeight
().
subtract
(
hgcw013
.
getSaveInvoiceWeight
()));
}
if
(
hgcg003B
.
getInvoiceRemainingAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_REMAINING_AMOUNT
,
hgcg003B
.
getInvoiceRemainingAmount
().
subtract
(
hgcw013
.
getSaveInvoiceAmount
()));
}
else
{
paramMap
.
put
(
HGCG003B
.
FIELD_INVOICE_REMAINING_AMOUNT
,
hgcg003B
.
getAmount
().
subtract
(
hgcw013
.
getSaveInvoiceAmount
()));
}
//收货金额等于开票金额
if
(
hgcg003B
.
getAmount
().
compareTo
(
hgcg003B
.
getInvoiceAmount
().
add
(
hgcw013
.
getSaveInvoiceAmount
()))
==
0
){
paramMap
.
put
(
HGCG003B
.
FIELD_IS_INVOICING
,
HGConstant
.
CgIsInvoicing
.
S_1
);
}
}
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003A
.
UPDATE_IS_INVOICING
,
paramMap
);
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003A
.
UPDATE_IS_INVOICING
,
paramMap
);
hgcw013
.
setId
(
null
);
hgcw013
.
setId
(
null
);
this
.
addHGCW013
(
hgcw013
);
this
.
addHGCW013
(
hgcw013
);
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012A.xml
View file @
a4fb41c1
...
@@ -456,7 +456,13 @@
...
@@ -456,7 +456,13 @@
A.IS_INVOICING as "isInvoicing",
A.IS_INVOICING as "isInvoicing",
A.CALCULATION_METHOD as "calculationMethod",
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
A.CALCULATION_METHOD as "calculationMethod",
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
A.CANCEL_AMOUNT as "cancelAmount",
A.CANCEL_AMOUNT as "cancelAmount",
A.UN_CANCEL_AMOUNT as "unCancelAmount"
A.UN_CANCEL_AMOUNT as "unCancelAmount",
A.INVOICE_QTY as "invoiceQty",
A.INVOICE_WEIGHT as "invoiceWeight",
A.INVOICE_AMOUNT as "invoiceAmount",
A.INVOICE_REMAINING_QTY as "invoiceRemainingQty",
A.INVOICE_REMAINING_WEIGHT as "invoiceRemainingWeight",
A.INVOICE_REMAINING_AMOUNT as "invoiceRemainingAmount"
FROM ${hggpSchema}.HGCG003A A LEFT JOIN ${hggpSchema}.HGCG003 B ON A.PRIMARY_ID = B.ID
FROM ${hggpSchema}.HGCG003A A LEFT JOIN ${hggpSchema}.HGCG003 B ON A.PRIMARY_ID = B.ID
WHERE A.DELETE_FLAG = 0 and b.delete_flag = 0
WHERE A.DELETE_FLAG = 0 and b.delete_flag = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
src/main/webapp/HG/CW/HGCW012A.js
View file @
a4fb41c1
...
@@ -75,6 +75,66 @@ function btnSaveFunc(btnNode, gridNode) {
...
@@ -75,6 +75,66 @@ function btnSaveFunc(btnNode, gridNode) {
return
;
return
;
}
}
let
flag
=
true
;
let
flag
=
true
;
if
(
gridNode
==
'result'
){
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
saveInvoiceQty
=
item
[
'saveInvoiceQty'
];
let
depositQty
=
item
[
'depositQty'
];
let
invoiceRemainingQty
=
item
[
'invoiceRemainingQty'
];
if
(
!
isNumber
(
saveInvoiceQty
)
&&
!
isPositiveNumber
(
saveInvoiceQty
))
{
message
(
"勾选的第"
+
(
index
+
1
)
+
"行收票数量必须是大于0的数字"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
saveInvoiceQty
)
>
parseFloat
(
depositQty
))
{
message
(
"第"
+
(
index
+
1
)
+
"行收票数量不能大于数量"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
saveInvoiceQty
)
>
parseFloat
(
invoiceRemainingQty
))
{
message
(
"第"
+
(
index
+
1
)
+
"行收票数量不能大于收票剩余数量"
);
flag
=
false
;
return
false
;
}
let
saveInvoiceWeight
=
item
[
'saveInvoiceWeight'
];
let
receiveWeight
=
item
[
'receiveWeight'
];
let
invoiceRemainingWeight
=
item
[
'invoiceRemainingWeight'
];
if
(
!
isNumber
(
saveInvoiceWeight
)
&&
!
isPositiveNumber
(
saveInvoiceWeight
))
{
message
(
"勾选的第"
+
(
index
+
1
)
+
"行收票重量必须是大于0的数字"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
saveInvoiceWeight
)
>
parseFloat
(
receiveWeight
))
{
message
(
"第"
+
(
index
+
1
)
+
"行收票重量不能大于重量"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
saveInvoiceWeight
)
>
parseFloat
(
invoiceRemainingWeight
))
{
message
(
"第"
+
(
index
+
1
)
+
"行收票重量不能大于收票剩余重量"
);
flag
=
false
;
return
false
;
}
let
thisSettlementAmount
=
item
[
'thisSettlementAmount'
];
let
amount
=
item
[
'amount'
];
let
invoiceRemainingAmount
=
item
[
'invoiceRemainingAmount'
];
if
(
!
isNumber
(
thisSettlementAmount
)
&&
!
isPositiveNumber
(
thisSettlementAmount
))
{
message
(
"勾选的第"
+
(
index
+
1
)
+
"行发票总额必须是大于0的数字"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
thisSettlementAmount
)
>
parseFloat
(
amount
))
{
message
(
"第"
+
(
index
+
1
)
+
"行发票总额不能大于收货金额"
);
flag
=
false
;
return
false
;
}
if
(
parseFloat
(
thisSettlementAmount
)
>
parseFloat
(
invoiceRemainingAmount
))
{
message
(
"第"
+
(
index
+
1
)
+
"行发票总额不能大于收票剩余金额"
);
flag
=
false
;
return
false
;
}
})
}
if
(
gridNode
==
'resultA'
){
if
(
gridNode
==
'resultA'
){
$
.
each
(
rows
,
function
(
index
,
item
)
{
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
thisAmount
=
item
[
'thisAmount'
];
let
thisAmount
=
item
[
'thisAmount'
];
...
@@ -222,7 +282,7 @@ $(function () {
...
@@ -222,7 +282,7 @@ $(function () {
field
:
"depositQty"
,
field
:
"depositQty"
,
title
:
"数量"
,
title
:
"数量"
,
headerTemplate
:
"<span style='color: '>数量 </span>"
,
headerTemplate
:
"<span style='color: '>数量 </span>"
,
format
:
"{0:N
0
}"
,
format
:
"{0:N
2
}"
,
align
:
"right"
,
align
:
"right"
,
enable
:
false
,
enable
:
false
,
locked
:
false
locked
:
false
...
@@ -243,7 +303,7 @@ $(function () {
...
@@ -243,7 +303,7 @@ $(function () {
editType
:
"date"
,
editType
:
"date"
,
parseFormats
:
"['yyyyMMdd']"
,
parseFormats
:
"['yyyyMMdd']"
,
dateFormat
:
"yyyy-MM-dd"
,
dateFormat
:
"yyyy-MM-dd"
,
enable
:
tru
e
,
enable
:
fals
e
,
locked
:
false
,
locked
:
false
,
template
:
function
(
date
)
{
template
:
function
(
date
)
{
if
(
date
.
receiveDate
instanceof
Date
){
if
(
date
.
receiveDate
instanceof
Date
){
...
@@ -271,18 +331,104 @@ $(function () {
...
@@ -271,18 +331,104 @@ $(function () {
format
:
"{0:C2}"
,
format
:
"{0:C2}"
,
align
:
"right"
,
align
:
"right"
,
locked
:
false
,
locked
:
false
,
attributes
:
{
required
:
true
},
template
:
function
(
item
)
{
template
:
function
(
item
)
{
if
(
isBlank
(
item
.
thisSettlementAmount
)){
//剩余金额大于0,默认为剩余金额
if
(
item
.
isInvoicing
==
0
&&
item
.
invoiceRemainingAmount
>
0
&&
isBlank
(
item
.
thisSettlementAmount
)){
item
.
thisSettlementAmount
=
item
.
invoiceRemainingAmount
;
}
else
if
(
isBlank
(
item
.
thisSettlementAmount
)){
item
.
thisSettlementAmount
=
item
.
taxIncludeAmount
;
item
.
thisSettlementAmount
=
item
.
taxIncludeAmount
;
resultGrid
.
setCellValue
(
item
,
"thisSettlementAmount"
,
item
.
taxIncludeAmount
)
}
}
item
.
saveInvoiceAmount
=
item
.
thisSettlementAmount
;
return
kendo
.
format
(
"{0:C2}"
,
parseFloat
(
item
.
thisSettlementAmount
));
return
kendo
.
format
(
"{0:C2}"
,
parseFloat
(
item
.
thisSettlementAmount
));
}
}
},
{
field
:
"saveInvoiceQty"
,
title
:
"收票数量"
,
headerTemplate
:
"<span style='color: '>收票数量 </span>"
,
format
:
"{0:N2}"
,
align
:
"right"
,
enable
:
true
,
locked
:
false
,
attributes
:
{
required
:
true
},
template
:
function
(
item
)
{
if
(
item
.
isInvoicing
==
0
&&
item
.
invoiceRemainingQty
>
0
&&
isBlank
(
item
.
saveInvoiceQty
)){
item
.
saveInvoiceQty
=
item
.
invoiceRemainingQty
;
}
else
if
(
item
.
isInvoicing
==
0
&&
isBlank
(
item
.
saveInvoiceQty
)){
item
.
saveInvoiceQty
=
item
.
depositQty
;
}
return
kendo
.
format
(
"{0:N2}"
,
parseFloat
(
item
.
saveInvoiceQty
));
}
},
{
field
:
"saveInvoiceWeight"
,
title
:
"收票重量"
,
headerTemplate
:
"<span style='color: '>收票重量 </span>"
,
format
:
"{0:N2}"
,
align
:
"right"
,
enable
:
true
,
locked
:
false
,
attributes
:
{
required
:
true
},
template
:
function
(
item
)
{
if
(
item
.
isInvoicing
==
0
&&
item
.
invoiceRemainingWeight
>
0
&&
isBlank
(
item
.
saveInvoiceWeight
)){
item
.
saveInvoiceWeight
=
item
.
invoiceRemainingWeight
;
}
else
if
(
item
.
isInvoicing
==
0
&&
isBlank
(
item
.
saveInvoiceWeight
)){
item
.
saveInvoiceWeight
=
item
.
receiveWeight
;
}
return
kendo
.
format
(
"{0:N2}"
,
parseFloat
(
item
.
saveInvoiceWeight
));
}
},
{
field
:
"invoiceRemainingQty"
,
title
:
"收票剩余数量"
,
headerTemplate
:
"<span style='color: '>收票剩余数量 </span>"
,
format
:
"{0:N2}"
,
align
:
"right"
,
enable
:
false
,
locked
:
false
,
template
:
function
(
item
)
{
if
(
item
.
isInvoicing
==
0
&&
item
.
invoiceRemainingQty
==
0
){
item
.
invoiceRemainingQty
=
item
.
depositQty
;
}
return
kendo
.
format
(
"{0:N2}"
,
parseFloat
(
item
.
invoiceRemainingQty
));
}
},
{
field
:
"invoiceRemainingWeight"
,
title
:
"收票剩余重量"
,
headerTemplate
:
"<span style='color: '>收票剩余重量 </span>"
,
format
:
"{0:N2}"
,
align
:
"right"
,
enable
:
false
,
locked
:
false
,
template
:
function
(
item
)
{
if
(
item
.
isInvoicing
==
0
&&
item
.
invoiceRemainingWeight
==
0
){
item
.
invoiceRemainingWeight
=
item
.
receiveWeight
;
}
return
kendo
.
format
(
"{0:N2}"
,
parseFloat
(
item
.
invoiceRemainingWeight
));
}
},
{
field
:
"invoiceRemainingAmount"
,
title
:
"收票剩余金额"
,
headerTemplate
:
"<span style='color: '>收票剩余金额 </span>"
,
format
:
"{0:C2}"
,
align
:
"right"
,
enable
:
false
,
locked
:
false
,
template
:
function
(
item
)
{
if
(
item
.
isInvoicing
==
0
&&
item
.
invoiceRemainingAmount
==
0
){
item
.
invoiceRemainingAmount
=
item
.
amount
;
}
return
kendo
.
format
(
"{0:N2}"
,
parseFloat
(
item
.
invoiceRemainingAmount
));
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
// 此 grid 对象
$
(
"#info-tab-1"
).
on
(
"click"
,
function
()
{
$
(
"#info-tab-1"
).
on
(
"click"
,
function
()
{
grid
.
dataSource
.
page
(
1
);
grid
.
dataSource
.
page
(
1
);
});
});
},
},
dataBound
:
function
(
e
)
{
dataBound
:
function
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment