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
382858d0
Commit
382858d0
authored
Jul 27, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复可拆货值可能为负数的问题
parent
04f34775
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
17 deletions
+41
-17
splitOrder.vue
...views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
+22
-5
index.vue
src/views/ecw/order/splitApply/index.vue
+19
-12
No files found.
src/views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
View file @
382858d0
...
...
@@ -235,7 +235,7 @@
<span
class=
"mr-10"
>
{{ $t('入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg
</span>
<span
class=
"mr-10"
>
{{ $t('收费重量') }}:{{ mainOrderItem.chargeWeight || 0 }}kg
</span>
<span
class=
"mr-10"
>
{{ $t('数量(个)') }}:{{ mainOrderItem.quantity || 0 }}
</span>
<span
class=
"mr-10"
>
{{ $t('剩余
货值') }}:{{ mainOrderItem.worth || 0
}}{{ $t('元') }}
</span>
<span
class=
"mr-10"
>
{{ $t('剩余
可拆货值') }}:{{ leftWorth
}}{{ $t('元') }}
</span>
</div>
<div
class=
"page-title"
>
{{$t('可拆入仓记录')}}
</div>
<el-table
...
...
@@ -404,7 +404,7 @@ import {
getSplitList
,
// quantitycheck,
createSplitItem
,
deleteSplitItem
,
deleteSplitItem
,
splitItemWorthCheck
,
}
from
"
@/api/ecw/orderHandle
"
;
import
{
quantityRequired
}
from
"
@/api/ecw/warehouse
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
...
...
@@ -476,7 +476,9 @@ export default {
// 当前选择的入仓记录ID
selectedWarehouseInId
:
null
,
// 当前正在放入的入仓记录
currentPutIn
:
null
currentPutIn
:
null
,
// 订单剩余数据
orderLeftData
:
null
};
},
created
()
{
...
...
@@ -666,7 +668,16 @@ export default {
num -= item.num
})*/
return
num
}
},
// 订单剩余可拆货值
leftWorth
(){
if
(
!
this
.
orderData
?.
costVO
?.
totalWorth
)
return
0
;
let
worth
=
this
.
orderData
.
costVO
.
totalWorth
this
.
splitData
.
orderSplitItemBackVOList
.
forEach
(
item
=>
{
worth
-=
item
.
worth
})
return
worth
},
},
methods
:
{
/*检查并提交字段(体积,重量)修改*/
...
...
@@ -981,8 +992,14 @@ export default {
// 货值按照主单的总货值*订单的箱数比例
let
worth
=
(
this
.
orderData
.
costVO
.
totalWorth
*
this
.
putin
.
num
/
this
.
orderData
.
sumNum
).
toFixed
(
2
)
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
worth
)
},
// 查询订单剩余数据
getOrderLeftData
(){
splitItemWorthCheck
(
this
.
orderData
.
orderId
).
then
(
res
=>
{
this
.
orderLeftData
=
res
.
data
})
}
}
,
}
};
</
script
>
...
...
src/views/ecw/order/splitApply/index.vue
View file @
382858d0
...
...
@@ -276,7 +276,7 @@
<span
class=
"mr-10"
>
{{ $t('入仓重量') }}:{{ leftData.weight || 0 }}kg
</span>
<span
class=
"mr-10"
>
{{ $t('收费重量') }}:{{ leftData.chargeWeight || 0 }}kg
</span>
<span
class=
"mr-10"
>
{{ $t('数量(个)') }}:{{ leftData.quantity || 0 }}
</span>
<span
class=
"mr-10"
>
{{ $t('剩余货值') }}:{{ leftData.w
orth || 0 }}{{ $t('元') }}
</span>
<span
class=
"mr-10"
v-if=
"orderLeftData"
>
{{ $t('剩余订单货值') }}:{{ orderLeftData.splitResidueW
orth || 0 }}{{ $t('元') }}
</span>
</div>
</el-card>
...
...
@@ -566,7 +566,9 @@ export default {
// 当前选择的入仓记录ID
// selectedWarehouseInId: null,
// 当前正在放入的入仓记录
currentPutIn
:
null
currentPutIn
:
null
,
// 订单剩余数据,sumNum,splitNum,splitResidueNum,totalWorth,splitWorth,splitResidueWorth
orderLeftData
:
null
};
},
async
created
()
{
...
...
@@ -613,6 +615,9 @@ export default {
shopOpen
(
show
){
if
(
!
show
){
this
.
shopForm
=
{}
}
else
{
// 打开弹层查询剩余数据
this
.
getOrderLeftData
()
}
},
// 切换品名需要重置已放入的记录
...
...
@@ -1149,16 +1154,12 @@ export default {
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
chargeWeight
)
// 货值按照订单的总货值比例计算,所以需要判断是否是最后一次放入
splitItemWorthCheck
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
let
worth
=
(
res
.
data
.
totalWorth
*
this
.
putin
.
num
/
res
.
data
.
sumNum
).
toFixed
(
2
)
console
.
log
({
worth
},
res
.
data
.
totalWorth
,
this
.
putin
.
num
,
res
.
data
.
sumNum
,
this
.
putin
.
num
/
res
.
data
.
sumNum
)
// 如果是最后放入
if
(
res
.
data
.
splitResidueNum
==
this
.
putin
.
num
){
worth
=
res
.
data
.
splitResidueWorth
}
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
worth
)
console
.
log
(
'
set worth
'
,
worth
)
})
let
worth
=
(
this
.
orderLeftData
.
totalWorth
*
this
.
putin
.
num
/
this
.
orderLeftData
.
sumNum
).
toFixed
(
2
)
// 如果是最后放入
if
(
this
.
orderLeftData
.
splitResidueNum
==
this
.
putin
.
num
){
worth
=
this
.
orderLeftData
.
splitResidueWorth
}
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
worth
)
},
// 重置
reset
(){
...
...
@@ -1170,6 +1171,12 @@ export default {
async
cancel
(){
await
this
.
reset
()
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
},
// 查询订单剩余数据
getOrderLeftData
(){
splitItemWorthCheck
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
this
.
orderLeftData
=
res
.
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