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
a8017b08
Commit
a8017b08
authored
Apr 30, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拆单没搞完,提交备份一下
parent
08831f99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
154 additions
and
79 deletions
+154
-79
splitApply.vue
src/views/ecw/order/splitApply.vue
+154
-79
No files found.
src/views/ecw/order/splitApply.vue
View file @
a8017b08
...
@@ -154,14 +154,32 @@
...
@@ -154,14 +154,32 @@
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.brandType"
/>
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"scope.row.brandType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('体积')"
align=
"center"
>
<el-table-column
:label=
"$t('
入仓
体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
volume
}}
m³
</span>
<el-input
v-model=
"scope.row.volume"
@
change=
"updateField(scope.row, 'volume')"
size=
"mini"
>
<span
slot=
"append"
>
m³
</span>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('
重量')"
align=
"center"
>
<el-table-column
:label=
"$t('
收费体积')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
weight
}}
kg
</span>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
>
<span
slot=
"append"
>
m³
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.weight"
@
change=
"updateField(scope.row, 'weight')"
size=
"mini"
>
<span
slot=
"append"
>
kg
</span>
</el-input>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('收费重量')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
>
<span
slot=
"append"
>
kg
</span>
</el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
>
<el-table-column
:label=
"$t('箱数')"
align=
"center"
>
...
@@ -213,32 +231,42 @@
...
@@ -213,32 +231,42 @@
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"120px"
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"120px"
>
<el-row>
<el-form-item
:label=
"$t('中文品名')"
v-if=
"splitData.length>0"
>
<el-form-item
:label=
"$t('中文品名')+':'"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择中文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择中文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleZh"
:value=
"item.id"
:key=
"item.prodTitleZh"
></el-option>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleZh"
:value=
"item.id"
:key=
"item.prodTitleZh"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-row>
<el-form-item
:label=
"$t('英文品名')"
v-if=
"splitData.length>0"
>
<el-row>
<el-form-item
:label=
"$t('英文品名')+':'"
v-if=
"splitData.length>0"
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择英文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-select
v-model=
"shopForm.pordid"
:placeholder=
"$t('请选择英文品名')"
@
change=
"changeProdTitleZh"
clearable
>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleEn"
:value=
"item.id"
:key=
"item.prodTitleEn"
></el-option>
<el-option
v-for=
"item in splitData[0].orderSplitItemBackVOList"
:label=
"item.prodTitleEn"
:value=
"item.id"
:key=
"item.prodTitleEn"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('剩余箱数')+':'
"
>
<el-form-item
:label=
"$t('剩余箱数')
"
>
{{shopForm.sum||0}}
{{shopForm.sum||0}}
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('放入箱数')+':'
"
>
<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=
"shopForm.sum"
></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"quantityshow"
:label=
"$t('放入数量')+'('+$t('个')+')'+':
'"
>
<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=
"quantitySum"
></el-input-number>
</el-form-item>
</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>
<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>
<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-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-form-item>
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-input
v-model=
"shopForm.remark"
></el-input>
<el-input
v-model=
"shopForm.remark"
></el-input>
</el-form-item>
</el-form-item>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"shopAdd"
>
{{$t('确定')}}
</el-button>
<el-button
type=
"primary"
@
click=
"shopAdd"
>
{{$t('确定')}}
</el-button>
...
@@ -270,7 +298,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
...
@@ -270,7 +298,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
getOrder
}
from
'
@/api/ecw/order
'
import
{
getOrder
}
from
'
@/api/ecw/order
'
import
Decimal
from
'
decimal.js
'
export
default
{
export
default
{
name
:
"
SplitApply
"
,
name
:
"
SplitApply
"
,
...
@@ -364,6 +392,19 @@ export default {
...
@@ -364,6 +392,19 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
/*检查并提交字段(体积,重量)修改*/
updateField
(
row
,
field
){
let
val
=
parseFloat
(
row
[
field
])
if
(
!
val
||
val
<
0
){
this
.
$message
.
error
(
this
.
$t
(
'
数据无效
'
))
return
this
.
getList
()
}
createSplitItem
(
row
).
then
(()
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
修改成功
'
))
}).
catch
(()
=>
{
this
.
getList
()
})
},
checkCode
(
data
){
checkCode
(
data
){
if
(
data
.
indexOf
(
'
+
'
)
==-
1
){
if
(
data
.
indexOf
(
'
+
'
)
==-
1
){
return
'
+
'
+
data
return
'
+
'
+
data
...
@@ -452,6 +493,37 @@ export default {
...
@@ -452,6 +493,37 @@ export default {
this
.
$modal
.
msgError
(
this
.
$t
(
"
请先新建拆单
"
))
this
.
$modal
.
msgError
(
this
.
$t
(
"
请先新建拆单
"
))
return
return
}
}
// 判断体积和重量,子单和必须等于父单
// 1.将拆单中的商品项数据汇总保存到orderItem
this
.
splitData
.
forEach
(
item
=>
{
item
.
orderSplitItemBackVOList
.
forEach
(
splitItem
=>
{
let
orderItem
=
this
.
orderData
.
orderItemVOList
.
find
(
orderItem
=>
orderItem
.
orderItemId
==
splitItem
.
orderItemId
)
if
(
!
orderItem
.
splitSum
){
orderItem
.
splitSum
=
{
volume
:
new
Decimal
(
splitItem
.
volume
||
0
),
weight
:
new
Decimal
(
splitItem
.
weight
||
0
)
}
}
else
{
orderItem
.
splitSum
.
volume
=
orderItem
.
splitSum
.
volume
.
plus
(
splitItem
.
volume
||
0
)
orderItem
.
splitSum
.
weight
=
orderItem
.
splitSum
.
weight
.
plus
(
splitItem
.
weight
||
0
)
}
})
})
// 2. 遍历商品项 对比数据是否符合
let
prods
=
[]
// 数据不符合要求的商品
this
.
orderData
.
orderItemVOList
.
forEach
(
item
=>
{
if
(
!
item
.
splitSum
){
prods
.
push
(
this
.
$l
(
item
,
'
prodTitle
'
))
return
}
if
(
item
.
splitSum
.
volume
.
toNumber
()
!=
item
.
warehouseInInfoVO
.
volume
||
item
.
splitSum
.
weight
.
toNumber
()
!=
item
.
warehouseInInfoVO
.
weight
){
prods
.
push
(
this
.
$l
(
item
,
'
prodTitle
'
))
}
})
if
(
prods
.
length
){
return
this
.
$alert
(
this
.
$t
(
"
{prods}等商品拆单总数据跟主单不匹配
"
,
{
prods
:
prods
.
join
(
'
,
'
)}))
}
// if(this.selectedUsers.length==0){
// if(this.selectedUsers.length==0){
// this.$modal.msgError("请选择抄送人")
// this.$modal.msgError("请选择抄送人")
// return
// return
...
@@ -468,7 +540,6 @@ export default {
...
@@ -468,7 +540,6 @@ export default {
addShop
(
index
){
addShop
(
index
){
this
.
splitItemIndex
=
index
this
.
splitItemIndex
=
index
this
.
shopOpen
=
true
this
.
shopOpen
=
true
},
},
addSplit
(){
addSplit
(){
this
.
form
.
transportId
=
this
.
orderData
.
transportId
this
.
form
.
transportId
=
this
.
orderData
.
transportId
...
@@ -552,7 +623,11 @@ export default {
...
@@ -552,7 +623,11 @@ export default {
num
:
this
.
shopForm
.
num
,
num
:
this
.
shopForm
.
num
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderSplitId
:
this
.
splitData
[
this
.
splitItemIndex
].
id
,
orderSplitId
:
this
.
splitData
[
this
.
splitItemIndex
].
id
,
remark
:
this
.
shopForm
.
remark
remark
:
this
.
shopForm
.
remark
,
volume
:
this
.
shopForm
.
volume
,
chargeVolume
:
this
.
shopForm
.
chargeVolume
,
weight
:
this
.
shopForm
.
weight
,
chargeWeight
:
this
.
shopForm
.
chargeWeight
}
}
createSplitItem
(
params
).
then
(
res
=>
{
createSplitItem
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
...
...
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