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
294bfa0c
Commit
294bfa0c
authored
Aug 28, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购收货BUG修复
parent
2ed3b447
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
61 deletions
+58
-61
HGCG003B.js
src/main/webapp/HG/CG/HGCG003B.js
+57
-60
HGCG003B.jsp
src/main/webapp/HG/CG/HGCG003B.jsp
+1
-1
No files found.
src/main/webapp/HG/CG/HGCG003B.js
View file @
294bfa0c
$
(
function
()
{
$
(
function
()
{
var
inventRecordBoxBlockId
=
__eiInfo
.
getBlock
(
"invent_record_box_block_id"
).
getMappedRows
();
var
inventRecordBoxBlockId
=
__eiInfo
.
getBlock
(
"invent_record_box_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
...
@@ -7,64 +8,61 @@ $(function () {
...
@@ -7,64 +8,61 @@ $(function () {
pageSize
:
20
,
pageSize
:
20
,
pageSizes
:
[
20
,
50
,
70
,
100
],
pageSizes
:
[
20
,
50
,
70
,
100
],
},
},
columns
:
[
columns
:
[{
{
field
:
"inventCode"
,
field
:
"inventCode"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
item
.
inventCode
;
let
template
=
item
.
inventCode
;
if
(
item
.
inventCode
)
{
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlockId
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlockId
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlockId
[
i
][
'valueField'
])
{
if
(
item
.
inventCode
===
inventRecordBoxBlockId
[
i
][
'valueField'
]){
template
=
inventRecordBoxBlockId
[
i
][
'valueField'
];
template
=
inventRecordBoxBlockId
[
i
][
'valueField'
];
}
else
{
}
else
{
template
=
item
.
inventCode
;
template
=
item
.
inventCode
;
}
}
}
}
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
=
inventRecordBoxBlockId
;
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInventCodeProdTypeSixBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_record_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#|#:param4Field#"
,
filter
:
"contains"
});
}
}
return
template
;
},
},
{
editor
:
function
(
container
,
options
)
{
field
:
"primaryId"
,
let
inInfo
=
new
EiInfo
();
template
:
function
(
item
)
{
inInfo
.
set
(
"field"
,
options
.
field
);
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
let
dataSource
=
inventRecordBoxBlockId
;
return
$
(
"#inqu_status-0-primaryId"
).
val
();
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInventCodeProdTypeSixBox"
,
inInfo
,
{
}
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_record_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#|#:param4Field#"
,
filter
:
"contains"
});
}
}
],
},
{
field
:
"primaryId"
,
template
:
function
(
item
)
{
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
return
$
(
"#inqu_status-0-primaryId"
).
val
();
}
}],
beforeEdit
:
function
(
e
)
{
beforeEdit
:
function
(
e
)
{
var
status
=
$
(
"#status"
).
val
();
var
status
=
$
(
"#status"
).
val
();
if
(
status
!=
'0'
)
{
if
(
status
!=
'0'
)
{
e
.
preventDefault
();
e
.
preventDefault
();
}
}
var
source
=
$
(
"#source"
).
val
();
var
source
=
$
(
"#source"
).
val
();
if
(
source
===
'0'
)
{
if
(
source
===
'0'
)
{
//选择合同的明细不能修改存货信息
//选择合同的明细不能修改存货信息
for
(
let
i
=
0
;
i
<
e
.
sender
.
columns
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
e
.
sender
.
columns
.
length
;
i
++
)
{
//指定的列不让修改
//指定的列不让修改
...
@@ -77,7 +75,6 @@ $(function () {
...
@@ -77,7 +75,6 @@ $(function () {
}
}
}
}
}
}
},
},
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 此grid对象
// 此grid对象
...
@@ -170,22 +167,22 @@ $(window).load(function () {
...
@@ -170,22 +167,22 @@ $(window).load(function () {
* @param coefficient
* @param coefficient
*/
*/
let
calAmount
=
function
(
item
)
{
let
calAmount
=
function
(
item
)
{
let
price
=
item
.
price
;
//计算方式为重量乘单价
//计算方式为重量乘单价
if
(
item
.
calculationMethod
==
1
){
if
(
item
.
calculationMethod
==
1
)
{
if
(
item
.
receiveWeight
&&
item
.
price
){
let
receiveWeight
=
item
.
receiveWeight
;
if
(
!
isBlank
(
receiveWeight
)
&&
!
isBlank
(
price
))
{
// 重量*单价金额
// 重量*单价金额
let
totalAmount
=
item
.
receiveWeight
*
item
.
price
;
let
totalAmount
=
parseFloat
(
receiveWeight
)
*
parseFloat
(
price
)
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
}
}
else
{
}
else
{
if
(
item
.
receiveQty
&&
item
.
price
){
let
receiveQty
=
item
.
receiveQty
;
if
(
item
.
receiveQty
&&
item
.
price
){
if
(
!
isBlank
(
receiveQty
)
&&
!
isBlank
(
price
))
{
// 重量*单价金额
// 数量*单价金额
let
totalAmount
=
item
.
receiveQty
*
item
.
price
;
let
totalAmount
=
parseFloat
(
receiveQty
)
*
parseFloat
(
price
);
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
}
}
}
}
}
}
...
...
src/main/webapp/HG/CG/HGCG003B.jsp
View file @
294bfa0c
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
sumType=
"page"
/>
sumType=
"page"
/>
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
hidden=
"true"
/>
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"1
0
0"
align=
"center"
required=
"true"
>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"1
2
0"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:C3}"
required=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:C3}"
required=
"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