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
dc4992f3
Commit
dc4992f3
authored
May 04, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善订单拆单的最大值限制和计算平均数
parent
8e99a6d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
28 deletions
+54
-28
splitApply.vue
src/views/ecw/order/splitApply.vue
+54
-28
No files found.
src/views/ecw/order/splitApply.vue
View file @
dc4992f3
...
...
@@ -241,27 +241,36 @@
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleEn"
:value=
"item.id"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('剩余箱数')
"
>
{{shopForm.sum||0
}}
<el-form-item
:label2=
"$t('剩余箱数')"
v-if=
"mainOrderItem.orderItemId
"
>
剩余箱数{{ shopForm.sum || 0 }},可放入箱数:{{ mainOrderItem.num - 1
}}
</el-form-item>
<el-form-item
:label=
"$t('放入箱数')"
>
<el-input-number
v-model=
"shopForm.num"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum
"
></el-input-number>
<el-input-number
v-model=
"shopForm.num"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"mainOrderItem.num-1
"
></el-input-number>
</el-form-item>
<el-form-item
v-if=
"quantityshow"
:label=
"$t('放入数量')+'('+$t('个')+')'"
>
<el-input-number
v-model=
"shopForm.quantity"
controls-position=
"right"
:min=
"1"
:max=
"quantitySum"
></el-input-number>
<el-input-number
v-model=
"shopForm.quantity"
controls-position=
"right"
:min=
"1"
:max=
"mainOrderItem.quantity-1"
:placeholder=
"$t('最多可放入{quantity}', {
quantity: mainOrderItem.quantity-1
})"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('入仓体积')"
>
<el-input-number
v-model=
"shopForm.volume"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
>
<div>
{{ $t('剩余入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³,{{$t('可放入仓方数')}}:{{ (mainOrderItem.volume - 0.01).toFixed(2) }}m³
</div>
<div>
{{$t('剩余收费方数')}}:{{ mainOrderItem.chargeVolume || 0 }}m³,{{$t('可放入收费方数')}}:{{ (mainOrderItem.chargeVolume - 0.01).toFixed(2) }}m³
</div>
</el-form-item>
<el-form-item
:label=
"$t('入仓方数')"
>
<el-input-number
v-model=
"shopForm.volume"
controls-position=
"right"
:min=
"0"
:max=
"(mainOrderItem.volume - 0.01).toFixed(2)"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('收费方数')"
>
<el-input-number
v-model=
"shopForm.chargeVolume"
controls-position=
"right"
:min=
"0"
:max=
"(mainOrderItem.chargeVolume - 0.01).toFixed(2)"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('收费体积')"
>
<el-input-number
v-model=
"shopForm.chargeVolume"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum"
></el-input-number>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
>
<div>
{{$t('剩余入仓重量')}}:{{ mainOrderItem.weight || 0 }}kg,{{$t('可放入重量')}}:{{ (mainOrderItem.weight - 0.01).toFixed(2) }}kg
</div>
<div>
{{$t('剩余收费重量')}}:{{ mainOrderItem.chargeWeight || 0 }}kg,{{$t('可放入收费重量')}}:{{ (mainOrderItem.chargeWeight - 0.01).toFixed(2) }}kg
</div>
</el-form-item>
<el-form-item
:label=
"$t('入仓重量')"
>
<el-input-number
v-model=
"shopForm.weight"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum
"
></el-input-number>
<el-input-number
v-model=
"shopForm.weight"
controls-position=
"right"
:min=
"0"
:max=
"(mainOrderItem.weight - 0.01).toFixed(2)
"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('收费重量')"
>
<el-input-number
v-model=
"shopForm.chargeWeight"
@
change=
"numChange"
controls-position=
"right"
:min=
"1"
:max=
"shopForm.sum
"
></el-input-number>
<el-input-number
v-model=
"shopForm.chargeWeight"
controls-position=
"right"
:min=
"0"
:max=
"(mainOrderItem.chargeWeight - 0.01).toFixed(2)
"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('备注信息')+':'"
>
...
...
@@ -389,6 +398,16 @@ export default {
},
getDictDatas
(){
return
getDictDatas
},
// 放入品名试选择的商品项
orderItem
(){
if
(
!
this
.
orderData
||
!
this
.
shopForm
.
orderItemId
)
return
{}
return
this
.
orderData
.
orderItemVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
||
{}
},
// 主单数据,也就是拆分剩余的数据,可用来限制拆单放入的最大值
mainOrderItem
(){
if
(
!
this
.
orderItem
.
orderItemId
||
!
this
.
splitData
.
length
||
!
this
.
splitData
[
0
].
orderSplitItemBackVOList
)
return
{}
return
this
.
splitData
[
0
].
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
orderItem
.
orderItemId
)
||
{}
}
},
methods
:
{
...
...
@@ -573,9 +592,16 @@ export default {
this
.
quantityshow
=
res
.
data
})
},
// 输入方数箱数后,按照平均值计算数量和体积重量数据
numChange
(){
var
sum
=
parseInt
(
this
.
quantitySum
/
this
.
shopForm
.
num
)
this
.
$set
(
this
.
shopForm
,
'
quantity
'
,
sum
)
/*var sum = parseInt(this.quantitySum/this.shopForm.num)
this.$set(this.shopForm,'quantity',sum)*/
let
rate
=
this
.
shopForm
.
num
/
this
.
mainOrderItem
.
num
this
.
$set
(
this
.
shopForm
,
'
quantity
'
,
Math
.
ceil
(
this
.
mainOrderItem
.
quantity
*
rate
))
this
.
$set
(
this
.
shopForm
,
'
volume
'
,
(
this
.
mainOrderItem
.
volume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeVolume
'
,
(
this
.
mainOrderItem
.
chargeVolume
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
weight
'
,
(
this
.
mainOrderItem
.
weight
*
rate
).
toFixed
(
2
))
this
.
$set
(
this
.
shopForm
,
'
chargeWeight
'
,
(
this
.
mainOrderItem
.
chargeWeight
*
rate
).
toFixed
(
2
))
},
changeProdTitleEn
(){
var
list
=
[]
...
...
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