Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
107ac04f
Commit
107ac04f
authored
Dec 20, 2023
by
zhoutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合包封箱页面的长宽高修改后,体积也要根据长宽高自动计算
parent
8dd8e1b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
pkgPage.vue
src/views/ecw/box/shippingAir/nodePage/mergePkg/pkgPage.vue
+17
-3
No files found.
src/views/ecw/box/shippingAir/nodePage/mergePkg/pkgPage.vue
View file @
107ac04f
...
...
@@ -71,17 +71,17 @@
<el-row>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('长')"
prop=
"pkgLength"
>
<el-input-number
v-model=
"sealBoxForm.pkgLength"
:controls=
"false"
:precision=
"2"
style=
"width: 100px"
/>
<el-input-number
v-model=
"sealBoxForm.pkgLength"
:controls=
"false"
:precision=
"2"
style=
"width: 100px"
@
change=
"culSumVolume"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('宽')"
prop=
"pkgWidth"
>
<el-input-number
v-model=
"sealBoxForm.pkgWidth"
:controls=
"false"
:precision=
"2"
style=
"width: 100px"
/>
<el-input-number
v-model=
"sealBoxForm.pkgWidth"
:controls=
"false"
:precision=
"2"
style=
"width: 100px"
@
change=
"culSumVolume"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
:label=
"$t('高')"
prop=
"pkgHight"
>
<el-input-number
v-model=
"sealBoxForm.pkgHight"
:controls=
"false"
:precision=
"2"
style=
"width: 100px"
/>
<el-input-number
v-model=
"sealBoxForm.pkgHight"
:controls=
"false"
:precision=
"2"
style=
"width: 100px"
@
change=
"culSumVolume"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -188,6 +188,20 @@ export default {
})
return
arr
.
toString
()
},
//计算封箱体积
culSumVolume
()
{
let
temp
=
this
.
accMul
(
this
.
sealBoxForm
.
pkgLength
,
this
.
sealBoxForm
.
pkgWidth
)
let
sumVolume
=
this
.
accMul
(
temp
,
this
.
sealBoxForm
.
pkgHight
)
this
.
$set
(
this
.
sealBoxForm
,
'
sumVolume
'
,
sumVolume
)
},
accMul
(
arg1
,
arg2
)
{
var
m
=
0
,
s1
=
arg1
.
toString
(),
s2
=
arg2
.
toString
();
try
{
m
+=
s1
.
split
(
"
.
"
)[
1
].
length
}
catch
(
e
){}
try
{
m
+=
s2
.
split
(
"
.
"
)[
1
].
length
}
catch
(
e
){}
let
num
=
Number
(
s1
.
replace
(
"
.
"
,
""
))
*
Number
(
s2
.
replace
(
"
.
"
,
""
))
/
Math
.
pow
(
10
,
m
)
return
num
.
toFixed
(
2
)
},
getpositionNo
(
arr
){
if
(
!
arr
)
return
arr
let
data
=
[]
...
...
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