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
59080613
Commit
59080613
authored
Jun 28, 2024
by
13420
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售开票bug调整
parent
6fa0e9d8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
23 deletions
+68
-23
HGCW010.js
src/main/webapp/HG/CW/HGCW010.js
+28
-1
HGCW010A.js
src/main/webapp/HG/CW/HGCW010A.js
+40
-22
No files found.
src/main/webapp/HG/CW/HGCW010.js
View file @
59080613
...
@@ -24,10 +24,34 @@ $(function() {
...
@@ -24,10 +24,34 @@ $(function() {
}
}
],
],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
//此grid对象
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
$
(
"#SAVE"
).
on
(
"click"
,
saveFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#BTN_BILL"
).
on
(
"click"
,
billFunc
);
$
(
"#BTN_BILL"
).
on
(
"click"
,
billFunc
);
$
(
"#SAVE"
).
on
(
"click"
,
saveFunc
);
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
){
var
item
=
e
.
items
[
0
];
if
(
e
.
field
==
"taxPoints"
){
if
(
item
.
taxPoints
&&
item
.
totalContractPriceIncluding
){
let
thisSettlementTax
=
item
.
taxPoints
*
item
.
totalContractPriceIncluding
/
100
;
resultGrid
.
setCellValue
(
item
,
'thisSettlementTax'
,
thisSettlementTax
)
}
if
(
item
.
thisSettlementTax
&&
item
.
totalContractPriceIncluding
){
let
thisSettlementAmount
=
item
.
totalContractPriceIncluding
+
item
.
thisSettlementTax
;
resultGrid
.
setCellValue
(
item
,
'thisSettlementAmount'
,
thisSettlementAmount
)
}
loadChange
(
grid
,
e
,
"price"
);
}
}
)
},
},
onSuccess
:
function
(
e
)
{
onSuccess
:
function
(
e
)
{
...
@@ -73,6 +97,9 @@ function addFunc() {
...
@@ -73,6 +97,9 @@ function addFunc() {
});
});
}
}
/**
/**
* 保存
* 保存
*/
*/
...
...
src/main/webapp/HG/CW/HGCW010A.js
View file @
59080613
...
@@ -8,7 +8,7 @@ $(function() {
...
@@ -8,7 +8,7 @@ $(function() {
cancelFunc
();
cancelFunc
();
});
});
$
(
"#btn_save"
).
on
(
"click"
,
function
()
{
$
(
"#btn_save"
).
on
(
"click"
,
function
()
{
btnS
aveFunc
();
s
aveFunc
();
});
});
IPLATUI
.
EFGrid
.
result
=
{
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageable
:
{
...
@@ -45,36 +45,54 @@ function cancelFunc() {
...
@@ -45,36 +45,54 @@ function cancelFunc() {
parent
.
JSColorbox
.
setValueCallback
();
parent
.
JSColorbox
.
setValueCallback
();
}
}
function
btnSaveFunc
()
{
/**
* 保存
*/
function
saveFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
message
(
"请选择数据"
)
;
return
;
return
;
}
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
flag
=
true
;
let
thisAmount
=
rows
[
i
][
'thisAmount'
];
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
remainingAmount
=
rows
[
i
][
'remainingAmount'
];
let
reviewStatus
=
item
.
get
(
"reviewStatus"
);
if
(
!
isNumber
(
thisAmount
)
&&
!
isPositiveNumber
(
thisAmount
))
{
if
((
reviewStatus
===
"1"
)){
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次开票金额必须是大于0的数字"
);
message
(
"数据已审核"
);
return
;
flag
=
false
;
return
false
;
}
}
if
(
parseFloat
(
thisAmount
)
>
parseFloat
(
remainingAmount
))
{
});
message
(
"第"
+
(
i
+
1
)
+
"行本次开票金额不能大于剩余结算金额"
);
if
(
flag
)
{
return
;
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
var
info
=
new
EiInfo
();
info
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
));
EiCommunicator
.
send
(
"HGCW010"
,
"save"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
query
();
}
catch
(
e
)
{
// TODO: handle exception
}
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据生成销售开票单吗? "
,
{
}
else
{
ok
:
function
()
{
NotificationUtil
(
ei
,
"error"
);
JSUtils
.
submitGridsData
(
"result"
,
"HGCW010"
,
"select"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
}
);
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
}
});
});
}
}
}
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