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
e27cbcfd
Commit
e27cbcfd
authored
Jun 11, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装柜拆单
parent
96583783
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
290 additions
and
85 deletions
+290
-85
splitOrder.vue
...views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
+286
-81
WarehouseRecord.vue
...views/ecw/order/splitApply/components/WarehouseRecord.vue
+3
-2
index.vue
src/views/ecw/order/splitApply/index.vue
+1
-2
No files found.
src/views/ecw/box/shippingSea/nodePage/cabinet/splitOrder.vue
View file @
e27cbcfd
...
@@ -141,42 +141,47 @@
...
@@ -141,42 +141,47 @@
</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"
>
<el-input
v-model=
"scope.row.volume"
@
change=
"updateField(scope.row, 'volume')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.volume"
@
change=
"updateField(scope.row, 'volume')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
m³
</span>
<span
slot=
"append"
>
m³
</span>
</el-input>
</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"
>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.chargeVolume"
@
change=
"updateField(scope.row, 'chargeVolume')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
m³
</span>
<span
slot=
"append"
>
m³
</span>
</el-input>
</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"
>
<el-input
v-model=
"scope.row.weight"
@
change=
"updateField(scope.row, 'weight')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.weight"
@
change=
"updateField(scope.row, 'weight')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
kg
</span>
<span
slot=
"append"
>
kg
</span>
</el-input>
</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"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.chargeWeight"
@
change=
"updateField(scope.row, 'chargeWeight')"
size=
"mini"
disabled
>
<span
slot=
"append"
>
kg
</span>
<span
slot=
"append"
>
kg
</span>
</el-input>
</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"
>
<el-input
v-model=
"scope.row.worth"
@
change=
"updateField(scope.row, 'worth')"
size=
"mini"
:disabled=
"index === 0"
>
<el-input
v-model=
"scope.row.worth"
@
change=
"updateField(scope.row, 'worth')"
size=
"mini"
>
<span
slot=
"append"
>
{{
$t
(
'
美元
'
)
}}
</span>
<span
slot=
"append"
>
{{
$t
(
'
美元
'
)
}}
</span>
</el-input>
</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
.
num
}}
</span>
<el-button
type=
"text"
@
click=
"showWarehouse(scope.row)"
>
{{
scope
.
row
.
num
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"`${$t('数量')}($t('个')`"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
quantity
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -205,80 +210,217 @@
...
@@ -205,80 +210,217 @@
</div>
</div>
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"$t('放入品名')"
:visible.sync=
"shopOpen"
width=
"1500px"
append-to-body
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"150px"
>
<el-form
ref=
"shopForm"
:model=
"shopForm"
:rules=
"shopRules"
label-width=
"150px"
size=
"mini"
>
<el-row>
<el-form-item
:label=
"$t('中文品名')+':'"
prop=
"orderItemId"
>
<el-form-item
:label=
"$t('中文品名')+':'"
prop=
"orderItemId"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
@
change=
"onProdChange"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择中文品名')"
@
change=
"onProdChange"
>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleZh"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleZh"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-row>
<el-row>
<el-form-item
:label=
"$t('英文品名')+':'"
prop=
"orderItemId"
>
<el-form-item
:label=
"$t('英文品名')+':'"
prop=
"orderItemId"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
@
change=
"onProdChange"
>
<el-select
v-model=
"shopForm.orderItemId"
:placeholder=
"$t('请选择英文品名')"
@
change=
"onProdChange"
>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleEn"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
<el-option
v-for=
"item in orderItems"
:label=
"item.prodTitleEn"
:value=
"item.orderItemId"
:key=
"item.id"
:disabled=
"itemDisabled(item)"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('剩余箱数')+':'"
>
{{shopForm.leftNum||0}}
</el-form-item>
</el-col>
<!--剩余数量计算不出来,显示没意义-->
<!--<el-col :span="12" v-show="isQuantity">
<el-form-item :label="$t('剩余数量(个)')+':'">
{{shopForm.leftQuantity||0}}
</el-form-item>
</el-col>-->
</el-row>
<el-form-item
:label=
"$t('放入箱数')+':'"
>
<el-input-number
v-model=
"shopForm.num"
controls-position=
"right"
:min=
"0"
:max=
"+shopForm.leftNum"
@
change=
"calcAverg"
></el-input-number>
</el-form-item>
<el-form-item
:label=
"$t('剩余数据')"
>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
label-width=
"0"
>
<div>
{{$t('剩余箱数')}}{{ shopForm.sum || 0 }}
</div>
{{ $t('剩余入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³,
<div>
{{$t('剩余收费方数')}}:{{ mainOrderItem.chargeVolume || 0 }}m³
{{ $t('入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³
</el-form-item>
{{ $t('收费方数') }}:{{ mainOrderItem.chargeVolume || 0 }}m³
</div>
<el-form-item
:label=
"$t('入仓体积')"
>
<div>
<el-input-number
v-model=
"shopForm.volume"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.volume"
></el-input-number>
{{ $t('入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg
</el-form-item>
{{ $t('收费重量') }}:{{ mainOrderItem.chargeWeight || 0 }}kg
<el-form-item
:label=
"$t('收费体积')"
>
</div>
<el-input-number
v-model=
"shopForm.chargeVolume"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.chargeVolume"
></el-input-number>
<div>
{{ $t('数量(个)') }}:{{ mainOrderItem.quantity || 0 }}
{{ $t('剩余货值') }}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}
</div>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
label-width=
"0"
>
<el-card
class=
"box-card"
v-if=
"shopForm.specsRecordVOList"
>
{{ $t('剩余入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg,
<div
slot=
"header"
class=
"clearfix"
>
{{$t('剩余收费重量')}}:{{ mainOrderItem.chargeWeight || 0 }}kg
<span>
{{ $t('入仓记录') }}
</span>
</el-form-item>
<el-button
style=
"float: right;margin-left: 15px"
size=
"mini"
type=
"primary"
icon=
"el-icon-minus"
circle
@
click=
"deleteRow"
:disabled=
"shopForm.specsRecordVOList.length <= 1"
></el-button>
<el-form-item
:label=
"$t('入仓重量')"
>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"addRow"
:disabled=
"!shopForm.orderItemId"
></el-button>
<el-input-number
v-model=
"shopForm.weight"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.weight"
></el-input-number>
</div>
</el-form-item>
<el-table
<el-form-item
:label=
"$t('收费重量')"
>
:data=
"shopForm.specsRecordVOList"
<el-input-number
v-model=
"shopForm.chargeWeight"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.chargeWeight"
></el-input-number>
style=
"width: 100%"
>
</el-form-item>
<el-table-column
:label=
"$t('箱数')"
width=
"200px"
>
<el-form-item
v-if=
"mainOrderItem.orderItemId"
label-width=
"0"
>
<
template
v-slot:header
>
{{ $t('剩余货值') }}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
箱数
'
)
}}
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
class=
"flex"
label-width=
"0"
:prop=
"`specsRecordVOList.$
{$index}.num`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-75 tight"
v-model=
"row.num"
type=
"number"
></el-input-number>
<dict-selector
class=
"w-75"
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
v-model=
"row.specificationType"
defaultable
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装类型')"
width=
"100px"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
{{
$t
(
'
包装类型
'
)
}}
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"row.unit"
defaultable
></dict-selector>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
长
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.boxGauge1"
@
blur=
"calcVolume(row)"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
宽
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.boxGauge2"
@
blur=
"calcVolume(row)"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot:header
>
<span>
{{
$t
(
'
高
'
)
}}
</span>
(cm)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.boxGauge3"
@
blur=
"calcVolume(row)"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"入仓体积(m³)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
体积
'
)
}}
</span>
(m³)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`specsRecordVOList.$
{$index}.volume`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.volume"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"收费体积(m³)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
收费体积
'
)
}}
</span>
(m³)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`specsRecordVOList.$
{$index}.chargeVolume`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.chargeVolume"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"入仓重量(Kg)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
入仓重量
'
)
}}
</span>
(Kg)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`specsRecordVOList.$
{$index}.weight`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.weight"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
label=
"收费重量(Kg)"
>
<
template
v-slot:header
>
<span
style=
"color: red"
>
*
</span>
<span>
{{
$t
(
'
收费重量
'
)
}}
</span>
(Kg)
</
template
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`specsRecordVOList.$
{$index}.chargeWeight`"
:rules="{required: true, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-100 tight"
v-model=
"row.chargeWeight"
type=
"number"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('数量')"
width=
"130px"
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
:prop=
"`specsRecordVOList.$
{$index}.quantity`"
:rules="{required: isQuantity, message: $t('不能为空'), trigger: 'blur'}">
<el-input-number
controls-position=
"right"
:min=
"0"
class=
"w-75 tight"
v-model.number=
"row.quantity"
/>
{{
$t
(
'
个
'
)
}}
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
>
<
template
v-slot=
"{row,$index}"
>
<el-form-item
label-width=
"0"
>
<el-input
v-model=
"row.expressNo"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('储位')"
prop=
"orderLocationBackVOList"
>
<
template
v-slot=
"{ row, column, $index }"
>
<!--
<el-button
type=
"primary"
size=
"mini"
@
click=
"showLocation(row, $index)"
>
{{
$t
(
'
选择储位
'
)
}}
</el-button>
-->
<warehouse-area-select
v-model=
"row.orderLocationList"
:warehouse-id=
"splitData.dstWarehouseId"
></warehouse-area-select>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index}"
>
<el-popconfirm
v-if=
"$index > 0"
:title=
"$t('确定要删除该行入仓记录吗?')"
@
confirm=
"deleteRow($index)"
>
<template
v-slot:reference
>
<el-button
size=
"mini"
type=
"danger"
>
删除
</el-button>
</
template
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-card>
<el-form-item
:label=
"$t('放入数据')"
>
<div>
{{$t('箱数')}}{{ putin.num || 0 }}
</div>
<div>
{{ $t('入仓方数') }}:{{ putin.volume || 0 }}m³
{{ $t('收费方数') }}:{{ putin.chargeVolume || 0 }}m³
</div>
<div>
{{ $t('入仓重量') }}:{{ putin.weight || 0 }}kg
{{ $t('收费重量') }}:{{ putin.chargeWeight || 0 }}kg
</div>
<div>
{{ $t('数量(个)') }}:{{ putin.quantity || 0 }}
</div>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('放入货值')"
>
<el-form-item
:label=
"$t('放入货值')"
>
<el-input-number
v-model=
"shopForm.worth"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.worth"
></el-input-number>
<el-input-number
v-model=
"shopForm.worth"
controls-position=
"right"
:min=
"0"
:max=
"mainOrderItem.worth"
></el-input-number>
</el-form-item>
</el-form-item>
<!--按照原型这里需要显示剩余数量,但是事实无法计算剩余数量,因为已装数量是未知的-->
<!--按照原型这里需要显示剩余数量,但是事实无法计算剩余数量,因为已装数量是未知的-->
<el-form-item
:label=
"$t('放入数量(个)')+':'"
prop=
"quantity"
v-if=
"isQuantity"
>
<
!--<
el-form-item :label="$t('放入数量(个)')+':'" prop="quantity" v-if="isQuantity">
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="0" :max="mainOrderItem.quantity || undefined"></el-input-number>
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="0" :max="mainOrderItem.quantity || undefined"></el-input-number>
</el-form-item>
</el-form-item>
-->
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-form-item
:label=
"$t('备注信息')+':'"
>
<el-input
v-model=
"shopForm.remarks"
></el-input>
<el-input
v-model=
"shopForm.remarks"
></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>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
<el-button
@
click=
"shopCancel"
>
{{$t('取消')}}
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
append-to-body
></warehouse-record>
</div>
</div>
</template>
</template>
...
@@ -296,11 +438,17 @@ import {getOrder, splitItemUpdate} from "@/api/ecw/order";
...
@@ -296,11 +438,17 @@ import {getOrder, splitItemUpdate} from "@/api/ecw/order";
import
{
serviceMsg
,
toReviewDetail
}
from
"
../../utils
"
;
import
{
serviceMsg
,
toReviewDetail
}
from
"
../../utils
"
;
import
{
createApproval
,
approvalCancel
,
splitList
}
from
"
@/api/ecw/boxSea
"
;
import
{
createApproval
,
approvalCancel
,
splitList
}
from
"
@/api/ecw/boxSea
"
;
import
Decimal
from
"
decimal.js
"
;
import
Decimal
from
"
decimal.js
"
;
import
Warehouse
from
"
@/views/ecw/order/warehousing/components/Warehouse
"
;
import
WarehouseRecord
from
"
@/views/ecw/order/splitApply/components/WarehouseRecord
"
;
import
WarehouseAreaSelect
from
"
@/components/WarehouseAreaSelect
"
;
export
default
{
export
default
{
name
:
"
splitOrder
"
,
name
:
"
splitOrder
"
,
inheritAttrs
:
false
,
inheritAttrs
:
false
,
components
:
{
components
:
{
WarehouseAreaSelect
,
WarehouseRecord
,
Warehouse
,
WorkFlow
WorkFlow
},
},
props
:
{
props
:
{
...
@@ -343,7 +491,9 @@ export default {
...
@@ -343,7 +491,9 @@ export default {
isQuantity
:
false
,
isQuantity
:
false
,
// 主单数据
// 主单数据
mainOrder
:
{
orderSplitItemBackVOList
:
{}}
mainOrder
:
{
orderSplitItemBackVOList
:
{}},
// 当前查看的入仓记录
currentWarehouseRecord
:
null
};
};
},
},
created
()
{
created
()
{
...
@@ -395,6 +545,33 @@ export default {
...
@@ -395,6 +545,33 @@ export default {
mainOrderItem
(){
mainOrderItem
(){
if
(
!
this
.
shopForm
.
orderItemId
||
!
this
.
mainOrder
.
orderSplitItemBackVOList
.
length
)
return
{}
if
(
!
this
.
shopForm
.
orderItemId
||
!
this
.
mainOrder
.
orderSplitItemBackVOList
.
length
)
return
{}
return
this
.
mainOrder
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
||
{}
return
this
.
mainOrder
.
orderSplitItemBackVOList
.
find
(
item
=>
item
.
orderItemId
==
this
.
shopForm
.
orderItemId
)
||
{}
},
// 放入数据
putin
(){
let
data
=
{
num
:
new
Decimal
(
0
),
volume
:
new
Decimal
(
0
),
chargeVolume
:
new
Decimal
(
0
),
weight
:
new
Decimal
(
0
),
chargeWeight
:
new
Decimal
(
0
),
quantity
:
new
Decimal
(
0
)
}
this
.
shopForm
.
specsRecordVOList
&&
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
data
.
num
=
data
.
num
.
plus
(
new
Decimal
(
item
.
num
||
0
))
data
.
volume
=
data
.
volume
.
plus
(
new
Decimal
(
item
.
volume
||
0
))
data
.
chargeVolume
=
data
.
chargeVolume
.
plus
(
new
Decimal
(
item
.
chargeVolume
||
0
))
data
.
weight
=
data
.
weight
.
plus
(
new
Decimal
(
item
.
weight
||
0
))
data
.
chargeWeight
=
data
.
chargeWeight
.
plus
(
new
Decimal
(
item
.
chargeWeight
||
0
))
data
.
quantity
=
data
.
quantity
.
plus
(
new
Decimal
(
item
.
quantity
||
0
))
})
return
{
num
:
data
.
num
.
toNumber
(),
volume
:
data
.
volume
.
toNumber
(),
chargeVolume
:
data
.
chargeVolume
.
toNumber
(),
weight
:
data
.
weight
.
toNumber
(),
chargeWeight
:
data
.
chargeWeight
.
toNumber
(),
quantity
:
data
.
quantity
.
toNumber
()
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -551,11 +728,16 @@ export default {
...
@@ -551,11 +728,16 @@ export default {
// 如果主单商品项的入仓箱数小于可装箱数,则取商品项数据
// 如果主单商品项的入仓箱数小于可装箱数,则取商品项数据
leftNum
=
Math
.
min
(
leftNum
,
this
.
mainOrderItem
.
num
)
leftNum
=
Math
.
min
(
leftNum
,
this
.
mainOrderItem
.
num
)
// 放入箱数
// 放入箱数
this
.
$set
(
this
.
shopForm
,
'
num
'
,
leftNum
)
// this.$set(this.shopForm, 'num', leftNum)
this
.
calcAverg
()
// 默认给一个入仓记录
if
(
!
this
.
shopForm
.
specsRecordVOList
||
!
this
.
shopForm
.
specsRecordVOList
.
length
){
this
.
addRow
()
}
// this.calcAverg()
},
},
// 按比例计算体积重量的默认值
// 按比例计算体积重量的默认值
calcAverg
(){
/*
calcAverg(){
// 装箱比例
// 装箱比例
const rate = this.shopForm.num / this.mainOrderItem.num
const rate = this.shopForm.num / this.mainOrderItem.num
...
@@ -567,7 +749,7 @@ export default {
...
@@ -567,7 +749,7 @@ export default {
this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * 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))
this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2))
this.$set(this.shopForm, 'worth', (this.mainOrderItem.worth * rate).toFixed(2))
this.$set(this.shopForm, 'worth', (this.mainOrderItem.worth * rate).toFixed(2))
},
},
*/
/*async getSelectData(item) {
/*async getSelectData(item) {
await quantityRequired(this.orderData.lineId).then((res) => {
await quantityRequired(this.orderData.lineId).then((res) => {
if (res.data) {
if (res.data) {
...
@@ -588,43 +770,33 @@ export default {
...
@@ -588,43 +770,33 @@ export default {
shopAdd
()
{
shopAdd
()
{
this
.
$refs
[
"
shopForm
"
].
validate
((
valid
)
=>
{
this
.
$refs
[
"
shopForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 放入箱数自动计算出来的,所以不需要在做判断了
if
(
this
.
putin
.
num
===
0
)
{
/*
// 输入箱数大于实装箱数
const total = this.totalSplitNum();
const canSplitNum = Decimal.sub(
this.currRow.num,
this.currRow.installNum
).toNumber();
const remain = Decimal.sub(canSplitNum, total).toNumber();
if (this.shopForm.num > remain) {
this.$message.error(this.$t("放入箱数不能大于总箱数"));
return;
}*/
if
(
this
.
shopForm
.
num
===
0
)
{
this
.
$message
.
error
(
this
.
$t
(
"
放入箱数不能为0
"
));
this
.
$message
.
error
(
this
.
$t
(
"
放入箱数不能为0
"
));
return
;
return
;
}
}
if
(
this
.
shopForm
.
quantity
===
0
&&
this
.
isQuantity
)
{
if
(
this
.
putin
.
quantity
===
0
&&
this
.
isQuantity
)
{
this
.
$message
.
error
(
this
.
$t
(
"
放入数量(个)不能为0
"
));
this
.
$message
.
error
(
this
.
$t
(
"
放入数量(个)不能为0
"
));
return
;
return
;
}
}
this
.
shopForm
.
specsRecordVOList
.
forEach
(
item
=>
{
item
.
boxGauge
=
`
${
item
.
boxGauge1
}
*
${
item
.
boxGauge2
}
*
${
item
.
boxGauge3
}
`
})
let
params
=
{
let
params
=
{
num
:
this
.
shopForm
.
num
,
num
:
this
.
putin
.
num
,
// quantity: this.shopForm.quantity,
// quantity: this.shopForm.quantity,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderItemId
:
this
.
shopForm
.
orderItemId
,
orderSplitId
:
this
.
splitData
.
id
,
orderSplitId
:
this
.
splitData
.
id
,
remarks
:
this
.
shopForm
.
remarks
,
remarks
:
this
.
shopForm
.
remarks
,
volume
:
this
.
shopForm
.
volume
,
volume
:
this
.
putin
.
volume
,
weight
:
this
.
shopForm
.
weight
,
weight
:
this
.
putin
.
weight
,
chargeWeight
:
this
.
shopForm
.
chargeWeight
,
chargeWeight
:
this
.
putin
.
chargeWeight
,
chargeVolume
:
this
.
shopForm
.
chargeVolume
,
chargeVolume
:
this
.
putin
.
chargeVolume
,
worth
:
this
.
shopForm
.
worth
worth
:
this
.
shopForm
.
worth
||
0
,
specsRecordVOList
:
this
.
shopForm
.
specsRecordVOList
};
};
// 按数量计费的才需要传递数量
// 按数量计费的才需要传递数量
if
(
this
.
isQuantity
){
if
(
this
.
isQuantity
){
params
.
quantity
=
this
.
shopForm
.
quantity
params
.
quantity
=
this
.
putin
.
quantity
}
}
createSplitItem
(
params
).
then
((
res
)
=>
{
createSplitItem
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
this
.
$message
.
success
(
this
.
$t
(
"
放入成功
"
));
...
@@ -667,6 +839,39 @@ export default {
...
@@ -667,6 +839,39 @@ export default {
toReviewDetail
.
apply
(
this
,
[
cabinetSplitInfo
.
bpmProcessId
]);
toReviewDetail
.
apply
(
this
,
[
cabinetSplitInfo
.
bpmProcessId
]);
this
.
$emit
(
"
closeDialog2
"
,
"
close
"
);
this
.
$emit
(
"
closeDialog2
"
,
"
close
"
);
},
},
// 添加一行
addRow
(){
if
(
!
this
.
shopForm
.
specsRecordVOList
){
this
.
$set
(
this
.
shopForm
,
'
specsRecordVOList
'
,[])
}
this
.
shopForm
.
specsRecordVOList
.
push
({
orderLocationList
:
[]
})
},
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
deleteRow
(
index
){
const
spliceIndex
=
typeof
index
!==
'
number
'
?
this
.
shopForm
.
specsRecordVOList
.
length
-
1
:
index
this
.
shopForm
.
specsRecordVOList
.
splice
(
spliceIndex
,
1
)
},
// 计算体积
calcVolume
(
row
){
let
volume
=
Decimal
(
row
.
boxGauge1
||
0
)
.
times
(
Decimal
(
row
.
boxGauge2
||
0
))
.
times
(
Decimal
(
row
.
boxGauge3
||
0
)).
div
(
1000000
)
// 如果是箱的单位要乘以箱数
if
(
row
.
specificationType
===
1
)
{
row
.
volume
=
volume
.
times
(
Decimal
(
row
.
num
||
0
))
}
// 最低0.01
volume
=
Math
.
max
(
0.01
,
volume
.
toNumber
().
toFixed
(
2
))
this
.
$set
(
row
,
'
volume
'
,
volume
)
this
.
$set
(
row
,
'
chargeVolume
'
,
volume
)
},
// 显示入库记录
showWarehouse
(
row
){
this
.
currentWarehouseRecord
=
row
.
specsRecordVOList
}
},
},
};
};
</
script
>
</
script
>
...
...
src/views/ecw/order/splitApply/components/WarehouseRecord.vue
View file @
e27cbcfd
<
template
>
<
template
>
<!-- 拆单入仓记录 -->
<!-- 拆单入仓记录 -->
<el-dialog
:title=
"$t('入仓记录')"
:visible=
"show"
:before-close=
"closeDialog"
:close-on-click-modal=
"false"
width=
"1000px"
>
<el-dialog
:title=
"$t('入仓记录')"
:visible=
"show"
:before-close=
"closeDialog"
:close-on-click-modal=
"false"
width=
"1000px"
:append-to-body=
"appendToBody"
>
<el-table
:data=
"list"
>
<el-table
:data=
"list"
>
<el-table-column
type=
"index"
:label=
"$t('序号')"
/>
<el-table-column
type=
"index"
:label=
"$t('序号')"
/>
<el-table-column
:label=
"$t('箱数')"
prop=
"num"
/>
<el-table-column
:label=
"$t('箱数')"
prop=
"num"
/>
...
@@ -52,7 +52,8 @@ export default {
...
@@ -52,7 +52,8 @@ export default {
list
:{
list
:{
type
:
Array
,
type
:
Array
,
default
:
[]
default
:
[]
}
},
appendToBody
:
Boolean
},
},
data
(){
data
(){
return
{
return
{
...
...
src/views/ecw/order/splitApply/index.vue
View file @
e27cbcfd
...
@@ -436,7 +436,6 @@
...
@@ -436,7 +436,6 @@
</div>
</div>
<div>
<div>
{{ $t('数量(个)') }}:{{ putin.quantity || 0 }}
{{ $t('数量(个)') }}:{{ putin.quantity || 0 }}
{{ $t('剩余货值') }}:{{ putin.worth || 0 }}{{ $t('美元') }}
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -486,7 +485,7 @@
...
@@ -486,7 +485,7 @@
</span>
</span>
</el-dialog>
</el-dialog>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
:visible.sync=
"warehouseRecordVisible"
></warehouse-record>
<warehouse-record
v-if=
"currentWarehouseRecord"
:list=
"currentWarehouseRecord"
></warehouse-record>
</div>
</div>
</template>
</template>
...
...
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