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
23bd9d88
Commit
23bd9d88
authored
Jul 28, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化拆单货值
parent
4e49a78e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
orderHandle.js
src/api/ecw/orderHandle.js
+2
-2
index.vue
src/views/ecw/order/splitApply/index.vue
+29
-9
No files found.
src/api/ecw/orderHandle.js
View file @
23bd9d88
...
...
@@ -147,10 +147,10 @@ export function deleteAllSplit(orderId) {
}
// 获取拆单订单的总货值与箱数拆分记录
export
function
splitItemWorthCheck
(
orderId
)
{
export
function
splitItemWorthCheck
(
orderId
,
orderSplitItemId
)
{
return
request
({
url
:
'
/order/split-item/worth/check
'
,
method
:
'
get
'
,
params
:
{
orderId
}
params
:
{
orderId
,
orderSplitItemId
}
})
}
src/views/ecw/order/splitApply/index.vue
View file @
23bd9d88
...
...
@@ -625,13 +625,28 @@ export default {
// 默认取以前放入的品名
let
split
=
this
.
splitData
.
find
(
item
=>
item
.
id
==
this
.
splitData
[
this
.
splitIndex
].
id
)
this
.
shopForm
.
specsRecordVOList
=
[]
let
splitItemId
=
undefined
let
splitItem
=
undefined
if
(
split
)
{
let
specsRecordVOList
=
split
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)?.
specsRecordVOList
||
[]
specsRecordVOList
.
forEach
(
item
=>
{
const
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
item
.
boxGauge
.
split
(
'
*
'
)
this
.
shopForm
.
specsRecordVOList
.
push
({...
item
,
boxGauge1
,
boxGauge2
,
boxGauge3
})
})
splitItem
=
split
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
if
(
splitItem
){
let
specsRecordVOList
=
splitItem
.
specsRecordVOList
||
[]
specsRecordVOList
.
forEach
(
item
=>
{
const
[
boxGauge1
,
boxGauge2
,
boxGauge3
]
=
item
.
boxGauge
.
split
(
'
*
'
)
this
.
shopForm
.
specsRecordVOList
.
push
({...
item
,
boxGauge1
,
boxGauge2
,
boxGauge3
})
})
splitItemId
=
splitItem
.
id
}
}
// 填充原来的收费数据和货值
this
.
$set
(
this
.
shopForm
,
'
chargeVolume
'
,
splitItem
?.
chargeVolume
||
0
)
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
splitItem
?.
chargeWeight
||
0
)
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
splitItem
?.
worth
||
0
)
// 获取剩余货值,排除当前品名已放入数据
this
.
getOrderLeftData
(
splitItemId
)
},
'
shopForm.worth
'
(
val
,
oldVal
){
console
.
log
(
'
worth change from
'
,
oldVal
,
'
to
'
,
val
)
...
...
@@ -1014,6 +1029,11 @@ export default {
specsRecordVOList
:
this
.
shopForm
.
specsRecordVOList
}
// 货值不能超过可拆货值
if
(
params
.
worth
>
this
.
orderLeftData
.
splitResidueWorth
){
return
this
.
$message
.
error
(
this
.
$t
(
'
货值不能超过可拆货值
'
))
}
// 体积重量不能为0
const
fields
=
{
'
volume
'
:
this
.
$t
(
'
体积
'
),
...
...
@@ -1155,8 +1175,8 @@ export default {
// 货值按照订单的总货值比例计算,所以需要判断是否是最后一次放入
let
worth
=
(
this
.
orderLeftData
.
totalWorth
*
this
.
putin
.
num
/
this
.
orderLeftData
.
sumNum
).
toFixed
(
2
)
// 如果是最后放入
if
(
this
.
orderLeftData
.
splitResidueNum
==
this
.
putin
.
num
){
// 如果是最后放入
,或者超过了剩余货值,则直接取剩余货值
if
(
this
.
orderLeftData
.
splitResidueNum
==
this
.
putin
.
num
||
worth
>
this
.
orderLeftData
.
splitResidueWorth
){
worth
=
this
.
orderLeftData
.
splitResidueWorth
}
this
.
$set
(
this
.
shopForm
,
'
worth
'
,
worth
)
...
...
@@ -1173,8 +1193,8 @@ export default {
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
},
// 查询订单剩余数据
getOrderLeftData
(){
splitItemWorthCheck
(
this
.
queryParams
.
orderId
).
then
(
res
=>
{
getOrderLeftData
(
orderSplitItemId
){
splitItemWorthCheck
(
this
.
queryParams
.
orderId
,
orderSplitItemId
).
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