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
72c9bbd9
Commit
72c9bbd9
authored
Nov 13, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑报价单bug修复
parent
3203a1e9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1448 additions
and
1356 deletions
+1448
-1356
edit.vue
src/views/ecw/offer/edit.vue
+6
-4
edit.vue
src/views/ecw/order/edit.vue
+1442
-1352
No files found.
src/views/ecw/offer/edit.vue
View file @
72c9bbd9
...
...
@@ -1077,9 +1077,9 @@ export default {
selectedRouter
(
val
)
{
if
(
!
val
)
return
;[
"
1
"
,
"
4
"
].
forEach
((
service
)
=>
{
if
(
this
.
routeOtherServices
.
indexOf
(
service
)
<
0
&&
this
.
form
.
serviceType
.
indexOf
(
service
)
>
-
1
)
{
if
(
this
.
routeOtherServices
.
indexOf
(
service
)
<
0
&&
this
.
form
.
serviceType
.
indexOf
(
service
==
4
?
2
:
service
)
>
-
1
)
{
this
.
form
.
serviceType
.
splice
(
this
.
form
.
serviceType
.
findIndex
((
item
)
=>
item
==
service
),
this
.
form
.
serviceType
.
findIndex
((
item
)
=>
item
==
(
service
==
4
?
2
:
service
)
),
1
)
}
...
...
@@ -1334,7 +1334,8 @@ export default {
if
(
this
.
form
.
offerId
!=
null
)
{
let
data
=
Object
.
assign
({},
this
.
form
,
{
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
prodUpdateReqVOList
:
this
.
getProductListWithDefaultValue
()
prodUpdateReqVOList
:
this
.
getProductListWithDefaultValue
(),
serviceType
:
this
.
form
.
serviceType
.
join
(
"
,
"
)
})
if
(
data
.
status
<
3
)
{
data
.
status
=
status
...
...
@@ -1350,7 +1351,8 @@ export default {
console
.
log
(
JSON
.
stringify
(
this
.
contactsList
))
data
=
Object
.
assign
({},
this
.
form
,
{
prodCreateReqVOList
:
this
.
getProductListWithDefaultValue
(),
status
status
,
serviceType
:
this
.
form
.
serviceType
.
join
(
"
,
"
)
})
}
else
{
data
=
Object
.
assign
({},
this
.
form
,
{
...
...
src/views/ecw/order/edit.vue
View file @
72c9bbd9
...
...
@@ -11,51 +11,55 @@
:validate-on-rule-change=
"false"
>
<el-card
v-if=
"form.applyStatus == 1"
class=
"mb-10"
>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
以下信息修改审核中
'
)
}}
</div>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
以下信息修改审核中
'
)
}}
</div>
<el-table
:data=
"form.applyInfoList"
>
<el-table-column
label=
"字段"
prop=
"name"
></el-table-column>
<el-table-column
label=
"旧内容"
prop=
"orgValue"
></el-table-column>
<el-table-column
label=
"新内容"
prop=
"newValue"
></el-table-column>
</el-table>
</el-card>
<div
class=
"page-title"
>
{{
editMode
?
$t
(
'
编辑订单
'
)
+
'
-
'
+
(
form
.
orderNo
||
$t
(
'
草稿
'
))
:
$t
(
'
新建订单
'
)
}}
</div>
<div
class=
"page-title"
>
{{
editMode
?
$t
(
'
编辑订单
'
)
+
'
-
'
+
(
form
.
orderNo
||
$t
(
'
草稿
'
))
:
$t
(
'
新建订单
'
)
}}
</div>
<el-card
class=
"form-section mt-10"
>
<template
#header
>
<div
slot=
"header"
class=
"card-title"
>
发货人
</div>
</
template
>
<el-form-item
:label=
"$t('名称')"
prop=
"consignorContactsId"
>
<el-form-item
:label=
"$t('名称')"
prop=
"consignorContactsId"
>
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div
class=
"contact"
>
<el-input
v-model=
"form.consignorName"
placeholder=
""
:disabled2=
"inWarehouse"
/>
<img
v-if=
"!updateChannel"
src=
"@/assets/svg/contacts.svg"
class=
"phonebook"
@
click=
"contactChooseType='consignor'"
/>
<img
v-if=
"!updateChannel"
src=
"@/assets/svg/contact_create.svg"
class=
"phonebook"
@
click=
"quickCreateType='0'"
/>
<img
v-if=
"!updateChannel"
src=
"@/assets/svg/contacts.svg"
class=
"phonebook"
@
click=
"contactChooseType='consignor'"
/>
<img
v-if=
"!updateChannel"
src=
"@/assets/svg/contact_create.svg"
class=
"phonebook"
@
click=
"quickCreateType='0'"
/>
</div>
</el-form-item>
<el-form-item
:label=
"$t('电话')"
prop=
"consignorPhone"
>
<area-code-selector
v-model=
"form.consignorCountryCode"
class=
"w-200 mr-10"
disabled
/>
<el-input
v-model=
"form.consignorPhone"
class=
"w-200"
disabled
/>
<area-code-selector
v-model=
"form.consignorCountryCode"
class=
"w-200 mr-10"
disabled
/>
<el-input
v-model=
"form.consignorPhone"
class=
"w-200"
disabled
/>
</el-form-item>
<el-button
circle
icon=
"el-icon-circle-plus"
v-if=
"!showFullConsignor"
@
click=
"showFullConsignor=true"
></el-button>
<el-button
circle
icon=
"el-icon-circle-plus"
v-if=
"!showFullConsignor"
@
click=
"showFullConsignor=true"
></el-button>
<el-button
circle
icon=
"el-icon-remove"
v-else
@
click=
"showFullConsignor=false"
></el-button>
<div
v-if=
"showFullConsignor"
>
<el-form-item
:label=
"$t('英文名称')"
prop=
"consignorNameEn"
>
<el-form-item
:label=
"$t('英文名称')"
prop=
"consignorNameEn"
>
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div
class=
"contact"
>
<el-input
v-model=
"form.consignorNameEn"
placeholder=
""
:disabled2=
"inWarehouse"
/>
</div>
</el-form-item>
<el-form-item
:label=
"$t('公司中文名称')"
prop=
"consignorPhone"
>
<el-input
v-model=
"form.consignorCompany"
:disabled2=
"inWarehouse"
/>
<el-input
v-model=
"form.consignorCompany"
:disabled2=
"inWarehouse"
/>
</el-form-item>
<!-- v1.7新增 -->
<el-form-item
:label=
"$t('公司英文名称')"
prop=
"consignorPhone"
>
<el-input
v-model=
"form.consignorCompanyEn"
:disabled2=
"inWarehouse"
/>
<el-input
v-model=
"form.consignorCompanyEn"
:disabled2=
"inWarehouse"
/>
</el-form-item>
<el-form-item
label=
"Email"
prop=
"consignorPhone"
>
<el-input
v-model=
"form.consignorEmail"
:disabled2=
"inWarehouse"
/>
<el-input
v-model=
"form.consignorEmail"
:disabled2=
"inWarehouse"
/>
</el-form-item>
</div>
</el-card>
...
...
@@ -64,8 +68,8 @@
<div
class=
"flex items-center"
>
<div
slot=
"header"
class=
"card-title mr-20"
>
收货人
</div>
<el-radio-group
v-if=
"noConsignee"
v-model=
"hasConsignee"
>
<el-radio
:label=
"true"
>
{{
$t
(
'
有
'
)
}}
</el-radio>
<el-radio
:label=
"false"
>
{{
$t
(
'
无
'
)
}}
</el-radio>
<el-radio
:label=
"true"
>
{{
$t
(
'
有
'
)
}}
</el-radio>
<el-radio
:label=
"false"
>
{{
$t
(
'
无
'
)
}}
</el-radio>
</el-radio-group>
</div>
</
template
>
...
...
@@ -73,8 +77,10 @@
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div
class=
"contact"
>
<el-input
v-model=
"form.consigneeName"
placeholder=
""
:disabled=
"!hasConsignee"
/>
<img
v-if=
"!updateChannel && hasConsignee"
src=
"@/assets/svg/contacts.svg"
class=
"phonebook"
@
click=
"contactChooseType='consignee'"
/>
<img
v-if=
"!updateChannel && hasConsignee"
src=
"@/assets/svg/contact_create.svg"
class=
"phonebook"
@
click=
"quickCreateType='1'"
/>
<img
v-if=
"!updateChannel && hasConsignee"
src=
"@/assets/svg/contacts.svg"
class=
"phonebook"
@
click=
"contactChooseType='consignee'"
/>
<img
v-if=
"!updateChannel && hasConsignee"
src=
"@/assets/svg/contact_create.svg"
class=
"phonebook"
@
click=
"quickCreateType='1'"
/>
</div>
</el-form-item>
<!-- v1.7新增 -->
...
...
@@ -84,8 +90,10 @@
<el-input
v-model=
"form.consigneePhone"
class=
"w-200"
disabled
/>
</el-form-item>
<el-button
circle
icon=
"el-icon-circle-plus"
v-if=
"hasConsignee && !showFullConsignee"
@
click=
"showFullConsignee=true"
></el-button>
<el-button
circle
icon=
"el-icon-remove"
v-if=
"hasConsignee && showFullConsignee"
@
click=
"showFullConsignee=false"
></el-button>
<el-button
circle
icon=
"el-icon-circle-plus"
v-if=
"hasConsignee && !showFullConsignee"
@
click=
"showFullConsignee=true"
></el-button>
<el-button
circle
icon=
"el-icon-remove"
v-if=
"hasConsignee && showFullConsignee"
@
click=
"showFullConsignee=false"
></el-button>
<div
v-if=
"showFullConsignee"
>
<el-form-item
v-if=
"hasConsignee"
:label=
"$t('英文名称')"
prop=
"consigneeNameEn"
>
...
...
@@ -95,11 +103,11 @@
</div>
</el-form-item>
<el-form-item
v-if=
"hasConsignee"
:label=
"$t('公司中文名称')"
prop=
"consigneePhone"
>
<el-input
v-model=
"form.consigneeCompany"
:disabled=
"!hasConsignee"
/>
<el-input
v-model=
"form.consigneeCompany"
:disabled=
"!hasConsignee"
/>
</el-form-item>
<!-- v1.7新增 -->
<el-form-item
v-if=
"hasConsignee"
:label=
"$t('公司英文名称')"
prop=
"consigneePhone"
>
<el-input
v-model=
"form.consigneeCompanyEn"
:disabled=
"!hasConsignee"
/>
<el-input
v-model=
"form.consigneeCompanyEn"
:disabled=
"!hasConsignee"
/>
</el-form-item>
<el-form-item
v-if=
"hasConsignee"
label=
"Email"
prop=
"consigneePhone"
>
<el-input
v-model=
"form.consigneeEmail"
:disabled=
"!hasConsignee"
/>
...
...
@@ -107,7 +115,7 @@
</div>
</el-card>
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"card-title"
>
{{$t('运输')
}}
</div>
<div
slot=
"header"
class=
"card-title"
>
{{ $t('运输')
}}
</div>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportId"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"form.transportId"
formatter=
"number"
...
...
@@ -116,35 +124,47 @@
</div>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('始发城市')"
prop=
"departureId"
:disabled=
"false"
>
<el-select
v-model=
"form.departureId"
:placeholder=
"$t('请选择始发地')"
:disabled=
"form.shipmentState"
clearable
@
input=
"updateRoutes('departureId')"
>
<el-option
v-for=
"item in exportCityList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-select
v-model=
"form.departureId"
:placeholder=
"$t('请选择始发地')"
:disabled=
"form.shipmentState"
clearable
@
input=
"updateRoutes('departureId')"
>
<el-option
v-for=
"item in exportCityList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的国家')"
prop=
"destCountryId"
>
<el-select
v-model=
"form.destCountryId"
:placeholder=
"$t('请选择目的国家')"
@
change=
"handleChangeDestCountry"
clearable
:disabled=
"form.shipmentState"
>
<el-option
v-for=
"item in showDestCountryList"
:label=
"$l(item, 'guojiaName')"
:value=
"item.guojia"
:key=
"item.guojia"
></el-option>
<el-select
v-model=
"form.destCountryId"
:placeholder=
"$t('请选择目的国家')"
@
change=
"handleChangeDestCountry"
clearable
:disabled=
"form.shipmentState"
>
<el-option
v-for=
"item in showDestCountryList"
:label=
"$l(item, 'guojiaName')"
:value=
"item.guojia"
:key=
"item.guojia"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的城市')"
prop=
"objectiveId"
>
<el-select
v-model=
"form.objectiveId"
:placeholder=
"$t('请选择目的地')"
@
change=
"handleChangeDestCity"
clearable
>
<el-option
v-for=
"item in showDestCityList"
:label=
"$l(item, 'shiName')"
:value=
"item.shi"
:key=
"item.shi"
></el-option>
<el-select
v-model=
"form.objectiveId"
:placeholder=
"$t('请选择目的地')"
@
change=
"handleChangeDestCity"
clearable
>
<el-option
v-for=
"item in showDestCityList"
:label=
"$l(item, 'shiName')"
:value=
"item.shi"
:key=
"item.shi"
></el-option>
</el-select>
</el-form-item>
</div>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('选择线路')"
prop=
"lineId"
>
<el-input
:value=
"selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''"
disabled
:placeholder=
"$t('请在右侧选择线路')"
></el-input>
<el-input
:value=
"selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''"
disabled
:placeholder=
"$t('请在右侧选择线路')"
></el-input>
</el-form-item>
<!--select是原生组件,不受el-form的disabled控制-->
<select
size=
"5"
v-model=
"form.lineId"
style=
"min-width: 300px; border:1px solid #DCDFE6; border-radius:4px"
@
change=
"handleChangeLineId"
>
<select
size=
"5"
v-model=
"form.lineId"
style=
"min-width: 300px; border:1px solid #DCDFE6; border-radius:4px"
@
change=
"handleChangeLineId"
>
<option
v-for=
"item in routerList"
:value=
"item.id"
:key=
"item.id"
>
{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}
(
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"item.transportType"
></dict-tag>
)
{{ $l(item, 'startTitle') }} >> {{ $l(item, 'destTitle') }}
(
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"item.transportType"
></dict-tag>
)
</option>
</select>
</div>
<div
class=
"form-section mt-10"
>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"channelId"
v-if=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"
>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"channelId"
v-if=
"getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"
>
<!--嵌套一个form来脱离disabled控制-->
<el-form>
<selector
...
...
@@ -159,10 +179,13 @@
</div>
<div>
<!--默认显示类型(selectedRouter==null),如果选择路线后没开通则隐藏-->
<el-form-item
:label=
"$t('增值服务')"
v-if=
"routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1"
>
<el-form-item
:label=
"$t('增值服务')"
v-if=
"routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1"
>
<el-checkbox-group
v-model=
"form.type"
>
<el-checkbox
label=
"1"
v-if=
"routeOtherServices.indexOf('1') > -1"
>
{{$t('集运')}}
</el-checkbox>
<el-checkbox
label=
"2"
v-if=
"routeOtherServices.indexOf('4') > -1"
:disabled=
"form.shipmentState"
>
{{$t('海外仓')}}
</el-checkbox>
<el-checkbox
label=
"1"
v-if=
"routeOtherServices.indexOf('1') > -1"
>
{{ $t('集运') }}
</el-checkbox>
<el-checkbox
label=
"2"
v-if=
"routeOtherServices.indexOf('4') > -1"
:disabled=
"form.shipmentState"
>
{{ $t('海外仓') }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
...
...
@@ -170,19 +193,23 @@
<el-card
class=
"mt-10"
>
<div
slot=
"header"
class=
"card-title"
>
<!--lanbm 根据需求文档改 商品信息 为 商品 -->
<div
class=
"card-name"
>
{{$t('商品')}}
</div>
<el-button
type=
"primary"
size=
"mini"
@
click=
"addProduct(null)"
:disabled=
"!canAddProduct || !productEditable || updateChannel"
>
{{$t('添加')}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"showBatchImportDialog=true"
:disabled=
"!canAddProduct || !productEditable || updateChannel"
>
{{$t('批量添加')}}
</el-button>
<div
class=
"card-name"
>
{{ $t('商品') }}
</div>
<el-button
type=
"primary"
size=
"mini"
@
click=
"addProduct(null)"
:disabled=
"!canAddProduct || !productEditable || updateChannel"
>
{{ $t('添加') }}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"showBatchImportDialog=true"
:disabled=
"!canAddProduct || !productEditable || updateChannel"
>
{{ $t('批量添加') }}
</el-button>
</div>
<el-table
:data=
"form.orderItemVOList"
border
class=
"product-list"
v-if=
"!initing"
>
<el-table-column
:label=
"$t('序号')"
width=
"60px"
fixed
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('中文品名')"
width=
"160px"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
{{
$t
(
'
中文品名
'
)
}}
<span
class=
"red"
>
*
</span>
{{
$t
(
'
中文品名
'
)
}}
<span
class=
"red"
>
*
</span>
</
template
>
<
template
slot-scope=
"scope"
>
<el-form-item
label=
""
...
...
@@ -204,7 +231,7 @@
</el-table-column>
<el-table-column
:label=
"$t('英文品名')"
width=
"160px"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
{{
$t
(
'
英文品名
'
)
}}
<span
class=
"red"
>
*
</span>
{{
$t
(
'
英文品名
'
)
}}
<span
class=
"red"
>
*
</span>
</
template
>
<
template
slot-scope=
"scope"
>
<product-selector
...
...
@@ -212,13 +239,13 @@
v-model=
"scope.row.prodId"
@
change=
"onProductChange(scope.row, $event)"
@
focus=
"scope.row.updated = true"
:disabled=
"!canAddProduct || !productEditable"
/>
:disabled=
"!canAddProduct || !productEditable"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('品牌')"
width=
"100px"
>
<
template
slot=
"header"
>
{{
$t
(
'
品牌
'
)
}}
<span
class=
"red"
>
*
</span>
{{
$t
(
'
品牌
'
)
}}
<span
class=
"red"
>
*
</span>
</
template
>
<
template
slot-scope=
"scope"
>
<el-form-item
label=
""
...
...
@@ -228,29 +255,33 @@
}"
class="mb-0 mr-0"
>
<dict-selector
v-model=
"scope.row.brandType"
:type=
"DICT_TYPE.ECW_IS_BRAND"
defaultable
:disabled=
"!canAddProduct || !productEditable"
/>
<dict-selector
v-model=
"scope.row.brandType"
:type=
"DICT_TYPE.ECW_IS_BRAND"
defaultable
:disabled=
"!canAddProduct || !productEditable"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('件数')"
width=
"90px"
>
<
template
slot=
"header"
>
{{
$t
(
'
件数
'
)
}}
<span
class=
"red"
>
*
</span>
{{
$t
(
'
件数
'
)
}}
<span
class=
"red"
>
*
</span>
</
template
>
<
template
slot-scope=
"{row}"
>
<el-input-number
:min=
"0"
:controls=
"false"
style=
"width: 65px"
v-model.number=
"row.num"
:disabled=
"!canAddProduct || !productEditable"
/>
<el-input-number
:min=
"0"
:controls=
"false"
style=
"width: 65px"
v-model.number=
"row.num"
:disabled=
"!canAddProduct || !productEditable"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('包装单位')"
width=
"100px"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
{{
$t
(
'
包装单位
'
)
}}
<span
class=
"red"
>
*
</span>
{{
$t
(
'
包装单位
'
)
}}
<span
class=
"red"
>
*
</span>
</
template
>
<
template
slot-scope=
"{row}"
>
<dict-selector
v-model=
"row.unit"
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
defaultable
:disabled=
"!canAddProduct || !productEditable"
/>
<dict-selector
v-model=
"row.unit"
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
defaultable
:disabled=
"!canAddProduct || !productEditable"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"`${$t('数量')}(${$t('个')})`"
width=
"120px"
>
<
template
slot-scope=
"{row}"
>
<el-input-number
:min=
"1"
:step=
"1"
style=
"width: 80px;"
:controls=
"false"
v-model=
"row.quantity"
:disabled=
"!canAddProduct || !productEditable"
/>
<el-input-number
:min=
"1"
:step=
"1"
style=
"width: 80px;"
:controls=
"false"
v-model=
"row.quantity"
:disabled=
"!canAddProduct || !productEditable"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('总体积') + '(m³)'"
width=
"120px"
>
...
...
@@ -262,7 +293,8 @@
]"
class="mb-0 mr-0"
>
<el-input-number
:min=
"0"
v-model=
"scope.row.volume"
:disabled=
"!canAddProduct || !productEditable"
:controls=
"false"
style=
"width: 80px"
/>
<el-input-number
:min=
"0"
v-model=
"scope.row.volume"
:disabled=
"!canAddProduct || !productEditable"
:controls=
"false"
style=
"width: 80px"
/>
</el-form-item>
</
template
>
</el-table-column>
...
...
@@ -275,13 +307,14 @@
]"
class="mb-0 mr-0"
>
<el-input-number
:min=
"0"
:controls=
"false"
style=
"width: 80px"
v-model=
"scope.row.weight"
:disabled=
"!canAddProduct || !productEditable"
/>
<el-input-number
:min=
"0"
:controls=
"false"
style=
"width: 80px"
v-model=
"scope.row.weight"
:disabled=
"!canAddProduct || !productEditable"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('总货值') + '(RMB)'"
width=
"100px"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
{{
$t
(
'
货值
'
)
}}
(RMB)
<span
class=
"red"
>
*
</span>
{{
$t
(
'
货值
'
)
}}
(RMB)
<span
class=
"red"
>
*
</span>
</
template
>
<
template
slot-scope=
"scope"
>
<el-form-item
label=
""
...
...
@@ -293,39 +326,45 @@
class="mb-0 mr-0"
>
<!--input事件在快速输入的时候,可能最后拿到的结果不是最后输入的参数,所以改成在blur的时候计算-->
<el-input-number
:min=
"0"
:controls=
"false"
style=
"width: 80px"
v-model.number=
"scope.row.worth"
:disabled=
"!canAddProduct"
@
blur=
"calculationPrice"
/>
<el-input-number
:min=
"0"
:controls=
"false"
style=
"width: 80px"
v-model.number=
"scope.row.worth"
:disabled=
"!canAddProduct"
@
blur=
"calculationPrice"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品特性')"
width=
"250px"
>
<
template
slot-scope=
"{row}"
>
<el-checkbox-group
v-model=
"row.prodAttrArr"
@
change=
"onProductAttrChange(row, $event)"
:disabled=
"row.prodAttrArr.indexOf(4)!=-1||!canAddProduct || !productEditable"
>
<el-checkbox
v-for=
"item in productAttrList"
:label=
"item.id"
:key=
"item.id"
>
{{
$l
(
item
,
'
attrName
'
)
}}
</el-checkbox>
<el-checkbox-group
v-model=
"row.prodAttrArr"
@
change=
"onProductAttrChange(row, $event)"
:disabled=
"row.prodAttrArr.indexOf(4)!=-1||!canAddProduct || !productEditable"
>
<el-checkbox
v-for=
"item in productAttrList"
:label=
"item.id"
:key=
"item.id"
>
{{
$l
(
item
,
'
attrName
'
)
}}
</el-checkbox>
</el-checkbox-group>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('是否预付')"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
v-if=
"row.fee"
:type=
"DICT_TYPE.ECW_PAY_ADVANCE"
:value=
"row.fee.isPayAdvance"
/>
<dict-tag
v-if=
"row.fee"
:type=
"DICT_TYPE.ECW_PAY_ADVANCE"
:value=
"row.fee.isPayAdvance"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品链接')"
width=
"200px"
align=
"center"
>
<
template
slot-scope=
"{row}"
>
<el-link
type=
"primary"
:href=
"row.link"
target=
"_blank"
style=
"display:block"
>
{{
row
.
link
}}
</el-link>
<el-link
type=
"primary"
:href=
"row.link"
target=
"_blank"
style=
"display:block"
>
{{
row
.
link
}}
</el-link>
<el-button
type=
"primary"
size=
"mini"
@
click=
"setLink(row)"
v-if=
"productEditable"
>
{{
row
.
link
?
$t
(
'
编辑商品链接
'
)
:
$t
(
'
添加商品链接
'
)
}}
{{
row
.
link
?
$t
(
'
编辑商品链接
'
)
:
$t
(
'
添加商品链接
'
)
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('快递单号')"
width=
"100px"
>
<
template
slot-scope=
"{row}"
>
<el-input
v-model=
"row.expressNo"
placeholder=
""
:disabled=
"!productEditable"
/>
<el-input
v-model=
"row.expressNo"
placeholder=
""
:disabled=
"!productEditable"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
width=
"80px"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"delProduct(scope.$index)"
:disabled=
"!productEditable || updateChannel"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"delProduct(scope.$index)"
:disabled=
"!productEditable || updateChannel"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
</
template
>
</el-table-column>
...
...
@@ -333,47 +372,50 @@
<!--
</el-card>
<el-card class="mt-10"> -->
<div
class=
"card-title"
style=
"padding:20px 0;"
>
{{$t('合计')
}}
</div>
<div
class=
"card-title"
style=
"padding:20px 0;"
>
{{ $t('合计')
}}
</div>
<el-descriptions
:column=
"6"
border
>
<el-descriptions-item
:label=
"$t('总件数')"
>
{{sum.totalNum.toFixed()
}}
{{ sum.totalNum.toFixed()
}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总体积')"
>
{{sum.totalVolume.toFixed()
}}m³
{{ sum.totalVolume.toFixed()
}}m³
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总重量')"
>
{{sum.totalWeight.toFixed()
}}kg
{{ sum.totalWeight.toFixed()
}}kg
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总数量')"
>
{{sum.totalQuatity.toFixed() || 0
}}
{{ sum.totalQuatity.toFixed() || 0
}}
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('总货值') + '(RMB)'"
>
{{sum.totalWorth.toFixed() || 0
}}元
{{ sum.totalWorth.toFixed() || 0
}}元
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('保价费')"
>
{{fee.insuranceFee || 0
}}
{{ fee.insuranceFee || 0
}}
{{ selectedRouter ? currentcyMap[selectedRouter.currencyUnit || 1] : '' }}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card
class=
"mt-10 right-label"
>
<div
class=
"card-title"
slot=
"header"
>
{{$t('通用')
}}
</div>
<div
class=
"card-title"
slot=
"header"
>
{{ $t('通用')
}}
</div>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('唛头')"
prop=
"marks"
class=
"w-500"
>
<el-input
v-model=
"form.marks"
></el-input>
<el-input
v-model=
"form.marks"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('单证报关')"
:span=
"2"
prop=
"customsType"
>
<
template
#label
>
{{
$t
(
'
单证报关
'
)
}}
<el-tooltip
effect=
"dark"
:content=
"$t('我司全代 : 该货物的出口手续由我司代为办理 ; 自单代报: 该货物由发货人提供相关出口单证并委托我司代为办理 ;混单代报该货物有以上两种情况出现')"
placement=
"top"
>
{{
$t
(
'
单证报关
'
)
}}
<el-tooltip
effect=
"dark"
:content=
"$t('我司全代 : 该货物的出口手续由我司代为办理 ; 自单代报: 该货物由发货人提供相关出口单证并委托我司代为办理 ;混单代报该货物有以上两种情况出现')"
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
</
template
>
<!--241023 已起运不让修改报关方式-->
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.customsType"
form-type=
"radio"
defaultable
:disabled=
"isShipment"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.customsType"
form-type=
"radio"
defaultable
:disabled=
"isShipment"
/>
<!--自单代报显示提示-->
<div
v-if=
"+form.customsType === 2"
style=
"color:red;font-size:14px"
>
{{$t('报关退税,请备齐资料。')
}}
</div>
<div
v-if=
"+form.customsType === 2"
style=
"color:red;font-size:14px"
>
{{ $t('报关退税,请备齐资料。')
}}
</div>
</el-form-item>
</div>
<div
class=
"form-section"
v-if=
"form.transportId == 3"
>
...
...
@@ -383,13 +425,13 @@
<el-form-item
:label=
"$t('目的港清关')"
class=
"w-500"
>
<el-radio-group
v-model=
"form.portDestCustomsClear"
>
<el-radio
:label=
"1"
>
{{$t('我司')
}}
{{ $t('我司')
}}
<el-tooltip
effect=
"dark"
:content=
"$t('我司承接')"
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
</el-radio>
<el-radio
:label=
"2"
>
{{$t('客户')
}}
{{ $t('客户')
}}
<el-tooltip
effect=
"dark"
:content=
"$t('客户自清')"
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
...
...
@@ -398,16 +440,18 @@
</el-form-item>
<el-form-item
:label=
"$t('发货方式')"
>
<el-radio-group
v-model=
"form.deliveryWay"
>
<el-radio
:label=
"1"
v-if=
"form.portDestCustomsClear == 1"
>
{{$t('多票')
}}
</el-radio>
<el-radio
:label=
"2"
>
{{$t('单票')
}}
</el-radio>
<el-radio
:label=
"1"
v-if=
"form.portDestCustomsClear == 1"
>
{{ $t('多票')
}}
</el-radio>
<el-radio
:label=
"2"
>
{{ $t('单票')
}}
</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('是否控货')"
prop=
"isCargoControl"
class=
"w-500"
>
<
template
#label
>
{{
$t
(
'
是否控货
'
)
}}
<el-tooltip
effect=
"dark"
:content=
"$t('是指由发货人与收货人约定在货物的国际运输过程中,我司作为第三方对该货物货权的控制;需由发货人授权我司放货的情况下收货人才能提取该票货物的一种交易方式')"
placement=
"top"
>
{{
$t
(
'
是否控货
'
)
}}
<el-tooltip
effect=
"dark"
:content=
"$t('是指由发货人与收货人约定在货物的国际运输过程中,我司作为第三方对该货物货权的控制;需由发货人授权我司放货的情况下收货人才能提取该票货物的一种交易方式')"
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
</
template
>
...
...
@@ -423,30 +467,35 @@
/>
</el-form-item>
<el-form-item
:label=
"$t('付款人')"
prop=
"drawee"
class=
"w-500"
>
<dict-selector
:formatter=
"Number"
:type=
"DICT_TYPE.DRAWEE"
v-model=
"form.drawee"
defaultable
form-type=
"radio"
:disabled=
"false"
/>
<el-table
:data=
"customDraweeList"
v-if=
"form.drawee==3"
>
<dict-selector
:formatter=
"Number"
:type=
"DICT_TYPE.DRAWEE"
v-model=
"form.drawee"
defaultable
form-type=
"radio"
:disabled=
"false"
/>
<el-table
:data=
"customDraweeList"
v-if=
"form.drawee==3"
>
<el-table-column
:label=
"$t('费用类型')"
prop=
"label"
width=
"200px"
></el-table-column>
<el-table-column
:label=
"$t('付款人')"
width=
"300px"
>
<
template
slot-scope=
"{row}"
>
<dict-selector
:formatter=
"Number"
:type=
"DICT_TYPE.DRAWEE"
:filter=
"(e) => e.value == 1 || e.value == 2"
v-model=
"row.value"
form-type=
"radio"
:disabled=
"false"
/>
<dict-selector
:formatter=
"Number"
:type=
"DICT_TYPE.DRAWEE"
:filter=
"(e) => e.value == 1 || e.value == 2"
v-model=
"row.value"
form-type=
"radio"
:disabled=
"false"
/>
</
template
>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item
:label=
"$t('提单是否显示价格')"
prop=
"displayBillLadingPrice"
>
<el-radio-group
v-model=
"form.displayBillLadingPrice"
>
<el-radio
:label=
"true"
>
{{$t('显示')
}}
</el-radio>
<el-radio
:label=
"false"
>
{{$t('不显示')
}}
</el-radio>
<el-radio
:label=
"true"
>
{{ $t('显示')
}}
</el-radio>
<el-radio
:label=
"false"
>
{{ $t('不显示')
}}
</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div
class=
"form-section flex"
>
<el-form-item
:label=
"$t('入仓类型')"
prop=
"warehouseType"
class=
"w-500"
>
<dict-selector
:type=
"DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model=
"form.warehouseType"
defaultable
:disabled=
"false"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model=
"form.warehouseType"
defaultable
:disabled=
"false"
/>
</el-form-item>
<div>
<el-form-item
:label=
"$t('外部仓库')"
prop=
"isExternalWarehouse"
>
<el-checkbox
label=
""
v-model=
"form.isExternalWarehouse"
@
change=
"form.isExternalWarehouse=$event"
:disabled=
"false"
></el-checkbox>
<el-checkbox
label=
""
v-model=
"form.isExternalWarehouse"
@
change=
"form.isExternalWarehouse=$event"
:disabled=
"false"
></el-checkbox>
</el-form-item>
<div
v-if=
"form.isExternalWarehouse"
>
<div
v-for=
"(item, index) in form.externalWarehouseDtoList"
class=
"flex"
:key=
"index"
>
...
...
@@ -457,7 +506,8 @@
required: true, message: '装货时间不能为空', trigger: 'blur'
}"
>
<el-date-picker
v-model=
"item.estLoadingTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
class=
"w-200"
></el-date-picker>
<el-date-picker
v-model=
"item.estLoadingTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
class=
"w-200"
></el-date-picker>
</el-form-item>
</div>
<div
class=
"w-500"
>
...
...
@@ -469,8 +519,11 @@
>
<el-input
v-model=
"item.loadingAddress"
placeholder=
""
class=
"w-200"
></el-input>
</el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-plus"
v-if=
"index==0"
@
click=
"form.externalWarehouseDtoList.push({})"
></el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
v-else-if=
"index == form.externalWarehouseDtoList.length-1"
@
click=
"form.externalWarehouseDtoList.splice(index, 1)"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
v-if=
"index==0"
@
click=
"form.externalWarehouseDtoList.push({})"
></el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
v-else-if=
"index == form.externalWarehouseDtoList.length-1"
@
click=
"form.externalWarehouseDtoList.splice(index, 1)"
></el-button>
</div>
</div>
</div>
...
...
@@ -481,30 +534,32 @@
<el-date-picker
v-model=
"form.deliveryDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('是否代收货款')"
prop=
"isCollection"
v-if=
"collectionProxy"
class=
"w-500"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
v-model=
"form.isCollection"
form-type=
"radio"
:disabled=
"false"
/>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
v-model=
"form.isCollection"
form-type=
"radio"
:disabled=
"false"
/>
</el-form-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-form-item
:label=
"$t('代收货款金额')"
v-if=
"collectionProxy && form.isCollection"
prop=
"collectionProxy"
>
<el-input
type=
"number"
v-model=
"form.collectionProxy"
class=
"w-200 mr-10"
:disabled=
"false"
></el-input>
<selector
v-model=
"form.collectionProxyCurrency"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w-100"
:disabled=
"false"
/>
<selector
v-model=
"form.collectionProxyCurrency"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w-100"
:disabled=
"false"
/>
</el-form-item>
</div>
<div
class=
"form-section flex"
>
<el-form-item
:label=
"$t('收货方式')"
prop=
"harvestMethod"
class=
"w-500"
>
<el-select
v-model=
"form.harvestMethod"
@
change=
"handleChange"
>
<el-option
:label=
"$t('自提')"
:value=
"1"
></el-option>
<el-option
v-if=
"homeDeliveryService"
:label=
"$t('送货上门')"
:value=
"2"
></el-option>
<el-option
:label=
"$t('自提')"
:value=
"1"
></el-option>
<el-option
v-if=
"homeDeliveryService"
:label=
"$t('送货上门')"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('关联报价单')"
prop=
"offerId"
>
<span
v-if=
"offerIdNochange&&offerNumber"
>
{{offerNumber
}}
</span>
<span
v-if=
"offerIdNochange&&offerNumber"
>
{{ offerNumber
}}
</span>
<el-select
v-else
v-model=
"form.offerId"
filterable
clearable
reserve-keyword
:disabled =
"offerIdNochange"
:disabled=
"offerIdNochange"
:placeholder=
"$t('请选择')"
>
<el-option
...
...
@@ -539,41 +594,50 @@
<div
class=
"card-title"
>
其他
</div>
</
template
>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('特殊要求')"
>
<el-form-item
:label=
"$t('特殊要求')"
>
<
template
#label
>
{{
$t
(
'
特殊要求
'
)
}}
<el-tooltip
effect=
"dark"
:content=
"$t('如需我司打包,请勾选相应选项,费用付款人及打包要求可备注补充')"
placement=
"top"
>
{{
$t
(
'
特殊要求
'
)
}}
<el-tooltip
effect=
"dark"
:content=
"$t('如需我司打包,请勾选相应选项,费用付款人及打包要求可备注补充')"
placement=
"top"
>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
</
template
>
<dict-selector
v-model=
"form.packageTypeArr"
form-type=
"checkbox"
:type=
"DICT_TYPE.ORDER_SPECIAL_NEEDS"
multiple
:disabled=
"false"
/>
<dict-selector
v-model=
"form.packageTypeArr"
form-type=
"checkbox"
:type=
"DICT_TYPE.ORDER_SPECIAL_NEEDS"
multiple
:disabled=
"false"
/>
</el-form-item>
<el-form-item
:label=
"$t('特殊要求备注')"
>
<el-input
v-model=
"form.packageRemarks"
:disabled=
"false"
></el-input>
<el-input
v-model=
"form.packageRemarks"
:disabled=
"false"
></el-input>
</el-form-item>
</div>
<div
class=
"form-section"
>
<el-form-item
:label=
"$t('快递单号')"
>
<el-input
v-model=
"form.number"
:placeholder=
"$t('请输入购买商品的快递单号')"
:disabled=
"false"
>
<el-button
type=
"primary"
slot=
"append"
@
click=
"getOrderCourierNumber"
:disabled=
"false"
>
{{$t('生成单号')}}
</el-button>
<el-button
type=
"primary"
slot=
"append"
@
click=
"getOrderCourierNumber"
:disabled=
"false"
>
{{ $t('生成单号') }}
</el-button>
</el-input>
</el-form-item>
</div>
<div
class=
"form-section"
v-if=
"[2,3,4].indexOf(+form.transportId) > -1"
>
<el-form-item
:label=
"$t('清关证书')"
>
<dict-selector
v-model=
"form.customsClearCert"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
:defaultable=
"!editMode"
:disabled=
"false"
/>
<dict-selector
v-model=
"form.customsClearCert"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
:defaultable=
"!editMode"
:disabled=
"false"
/>
</el-form-item>
<el-form-item
:label=
"$t('清关证书备注')"
>
<el-form-item
:label=
"$t('清关证书备注')"
>
<el-input
v-model=
"form.customsClearCertRemarks"
:disabled=
"false"
></el-input>
</el-form-item>
</div>
<div
class=
"form-section"
v-if=
"[3,4].indexOf(+form.transportId) > -1"
>
<div
class=
"form-section"
v-if=
"[3,4].indexOf(+form.transportId) > -1"
>
<el-form-item
:label=
"$t('是否拆包')"
>
<dict-selector
v-model=
"form.isUnpack"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
:defaultable=
"!editMode"
:disabled=
"false"
/>
<dict-selector
v-model=
"form.isUnpack"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
:defaultable=
"!editMode"
:disabled=
"false"
/>
</el-form-item>
<el-form-item
:label=
"$t('单票立刻转运')"
v-if=
"[3,4].indexOf(+form.transportId) > -1"
>
<dict-selector
v-model=
"form.isSingleTicketTransport"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
:defaultable=
"!editMode"
:disabled=
"false"
/>
<span
style=
"margin-left:10px"
>
{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}
</span>
<dict-selector
v-model=
"form.isSingleTicketTransport"
form-type=
"radio"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
:defaultable=
"!editMode"
:disabled=
"false"
/>
<span
style=
"margin-left:10px"
>
{{ $t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”') }}
</span>
</el-form-item>
</div>
<!-- 20240823 新需求改动:屏蔽出单方式 和 是否双清字段
...
...
@@ -596,52 +660,58 @@
</el-card>
<el-card
class=
"mt-10"
v-if=
"showWorkFlow"
>
<div
class=
"card-title"
slot=
"header"
>
{{$t('审批流程')
}}
</div>
<work-flow
:xmlkey=
"updateChannel ? 'shipment_channel_change' : 'order_modify'"
v-model=
"ccIdArr"
/>
<div
class=
"card-title"
slot=
"header"
>
{{ $t('审批流程')
}}
</div>
<work-flow
:xmlkey=
"updateChannel ? 'shipment_channel_change' : 'order_modify'"
v-model=
"ccIdArr"
/>
</el-card>
<div
style=
"margin: 30px 0; display: flex"
>
<!--返回按钮应该在表单被禁用的情况下也可以点击,所以需要用一个form来包裹以脱离原form的disabled控制-->
<el-form
inline
class=
"mr-10"
>
<el-button
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{$t('返回')
}}
</el-button>
<el-button
@
click=
"$store.dispatch('tagsView/delCurrentView')"
>
{{ $t('返回')
}}
</el-button>
</el-form>
<
template
v-if=
"form.applyStatus == 1"
>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + form.formId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"$router.push('/bpm/process-instance/detail?id=' + form.formId)"
>
{{
$t
(
'
审核中
'
)
}}
</el-button>
</
template
>
<!--更新渠道的时候用一个form包裹按钮,脱离原form的disabled控制-->
<el-form
v-else-if=
"updateChannel"
inline
>
<el-button
type=
"primary"
@
click=
"submitForm(2)"
>
{{$t('编辑订单')
}}
</el-button>
<!--修改-->
<el-button
type=
"primary"
@
click=
"submitForm(2)"
>
{{ $t('编辑订单')
}}
</el-button>
<!--修改-->
</el-form>
<
template
v-else
>
<el-button
type=
"primary"
@
click=
"submitForm(0)"
v-if=
"!form.status"
>
{{
$t
(
'
保存草稿
'
)
}}
</el-button>
<!--草稿-->
<el-button
type=
"primary"
@
click=
"submitForm(2)"
v-if=
"!form.orderId || !form.status"
>
{{
$t
(
'
新建订单
'
)
}}
</el-button>
<!--待入仓-->
<el-button
type=
"primary"
@
click=
"submitForm(2)"
v-else
>
{{
$t
(
'
编辑订单
'
)
}}
</el-button>
<!--修改-->
<el-button
type=
"primary"
@
click=
"submitForm(0)"
v-if=
"!form.status"
>
{{
$t
(
'
保存草稿
'
)
}}
</el-button>
<!--草稿-->
<el-button
type=
"primary"
@
click=
"submitForm(2)"
v-if=
"!form.orderId || !form.status"
>
{{
$t
(
'
新建订单
'
)
}}
</el-button>
<!--待入仓-->
<el-button
type=
"primary"
@
click=
"submitForm(2)"
v-else
>
{{
$t
(
'
编辑订单
'
)
}}
</el-button>
<!--修改-->
</
template
>
</div>
</el-form>
<el-dialog
:title=
"$t('批量导入')"
:visible.sync=
"showBatchImportDialog"
width=
"1000px"
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"$t('批量导入')"
:visible.sync=
"showBatchImportDialog"
width=
"1000px"
:close-on-click-modal=
"false"
>
<el-steps
:active=
"importList.length > 0 ? 1 : 0"
finish-status=
"success"
class=
"w-500"
style=
"margin: 20px auto"
>
<el-step
:title=
"$t('上传装箱单')"
></el-step>
<el-step
:title=
"$t('开始导入')"
></el-step>
<el-step
:title=
"$t('完成')"
></el-step>
</el-steps>
<div
class=
"mt-20"
>
<el-upload
:http-request=
"upload"
:show-file-list=
"false"
action=
""
class=
"mr-10"
style=
"display:inline-block; "
>
<el-button
size=
"small"
type=
"primary"
>
{{$t('点击上传')}}
</el-button>
<el-upload
:http-request=
"upload"
:show-file-list=
"false"
action=
""
class=
"mr-10"
style=
"display:inline-block; "
>
<el-button
size=
"small"
type=
"primary"
>
{{ $t('点击上传') }}
</el-button>
</el-upload>
<el-button
type=
"info"
@
click=
"downloadTpl"
size=
"small"
:loading=
"exportLoading"
>
{{$t('装箱单模板')}}
</el-button>
<el-button
type=
"info"
@
click=
"downloadTpl"
size=
"small"
:loading=
"exportLoading"
>
{{ $t('装箱单模板') }}
</el-button>
</div>
<el-table
:data=
"importList"
class=
"mt-10"
height=
"300"
>
<el-table-column
:label=
"$t('序号')"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('中文品名')"
prop=
"prodTitleZh"
></el-table-column>
<el-table-column
:label=
"$t('英文品名')"
prop=
"prodTitleEn"
></el-table-column>
<el-table-column
:label=
"$t('品牌')"
prop=
"brand"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"row.brandType"
/>
<dict-tag
:type=
"DICT_TYPE.ECW_IS_BRAND"
:value=
"row.brandType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('件数')"
prop=
"num"
></el-table-column>
...
...
@@ -654,13 +724,15 @@
</el-table>
<div
class=
"mt-10 center"
>
<el-button
type=
"primary"
@
click=
"addToProductList"
>
{{$t('下一步')
}}
</el-button>
<el-button
type=
"default"
@
click=
"showBatchImportDialog=false"
>
{{$t('取消')
}}
</el-button>
<el-button
type=
"primary"
@
click=
"addToProductList"
>
{{ $t('下一步')
}}
</el-button>
<el-button
type=
"default"
@
click=
"showBatchImportDialog=false"
>
{{ $t('取消')
}}
</el-button>
</div>
</el-dialog>
<choose-contact-dialog
v-if=
"!!contactChooseType"
:type=
"2"
@
choose=
"onContactChoose"
@
close=
"contactChooseType=null"
/>
<quick-create-customer
v-if=
"quickCreateType"
:type=
"quickCreateType"
@
success=
"onContactChoose"
@
close=
"quickCreateType=null"
/>
<choose-contact-dialog
v-if=
"!!contactChooseType"
:type=
"2"
@
choose=
"onContactChoose"
@
close=
"contactChooseType=null"
/>
<quick-create-customer
v-if=
"quickCreateType"
:type=
"quickCreateType"
@
success=
"onContactChoose"
@
close=
"quickCreateType=null"
/>
</div>
</template>
...
...
@@ -680,8 +752,8 @@ import {getProductAttrList} from '@/api/ecw/productAttr'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
import
Selector
from
'
@/components/Selector
'
import
CustomerContactSelector
from
'
@/components/CustomerContactSelector
'
import
{
getGuojiaAndShiAndWarehouseList
,
openedRouterList
as
getOpenedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
checkCountryCode
,
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getGuojiaAndShiAndWarehouseList
,
openedRouterList
as
getOpenedRouterList
}
from
'
@/api/ecw/warehouse
'
import
{
checkCountryCode
,
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
getDictData
,
getDictDatas
}
from
'
@/utils/dict
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
...
...
@@ -694,9 +766,9 @@ import {calculationPrice} from '@/api/ecw/product'
import
SupplierSelector
from
'
@/components/SupplierSelector
'
import
Decimal
from
'
decimal.js
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
getCustomer
}
from
"
@/api/ecw/customer
"
;
import
{
getCustomer
}
from
"
@/api/ecw/customer
"
;
import
{
debounce
}
from
"
@/utils
"
;
import
{
getOfferSelect
,
getOfferCheck
}
from
"
@/api/ecw/offer
"
import
{
getOfferSelect
,
getOfferCheck
}
from
"
@/api/ecw/offer
"
import
Template
from
'
@/views/cms/template/index.vue
'
// 缓存默认的表单数据
...
...
@@ -706,14 +778,14 @@ let makeDefaultFormData = () => {
lineId
:
null
,
objectiveId
:
null
,
departureId
:
null
,
status
:
0
,
sendstatus
:
0
,
status
:
0
,
sendstatus
:
0
,
isCargoControl
:
false
,
isCollection
:
false
,
type
:[],
type
:
[],
isExternalWarehouse
:
false
,
externalWarehouseDtoList
:[],
orderItemVOList
:[],
externalWarehouseDtoList
:
[],
orderItemVOList
:
[],
drawee
:
2
,
harvestMethod
:
1
,
displayBillLadingPrice
:
true
...
...
@@ -725,11 +797,20 @@ export default {
name
:
"
EcwOrderEdit
"
,
components
:
{
Template
,
ProductSelector
,
Selector
,
CustomerContactSelector
,
AreaSelector
,
FileUpload
,
AreaCodeSelector
,
ChooseContactDialog
,
QuickCreateCustomer
,
SupplierSelector
,
WorkFlow
ProductSelector
,
Selector
,
CustomerContactSelector
,
AreaSelector
,
FileUpload
,
AreaCodeSelector
,
ChooseContactDialog
,
QuickCreateCustomer
,
SupplierSelector
,
WorkFlow
},
data
()
{
let
validatorPositiveNumber
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
||
value
==
''
)
return
callback
();
if
(
!
value
||
value
==
''
)
return
callback
();
if
(
!
value
)
return
callback
(
new
Error
(
'
请输入数字
'
))
if
(
!
Number
(
value
))
return
callback
(
new
Error
(
'
请输入有效数字
'
))
let
reg
=
/
((
^
[
1-9
]\d
*
)
|^0
)(\.\d
*
){0,1}
$/
;
...
...
@@ -743,18 +824,18 @@ export default {
// 遮罩层
loading
:
true
,
//productList:[], // 商品信息
productAttrList
:[],
// 商品属性
productAttrList
:
[],
// 商品属性
channelList
:
[],
// 出货取到
routerList
:
[],
tradeCityList
:
[],
treeList
:
[],
consignorContact
:
{},
// 发货联系人
consigneeContact
:{},
// 收货联系人
consigneeContact
:
{},
// 收货联系人
/* consignee: null,
consignor: null, */
transportList
:
[],
currencyList
:[],
unitList
:[],
currencyList
:
[],
unitList
:
[],
couponList
:
[],
couponTypeList
:
[],
fee
:
{},
// 费用
...
...
@@ -764,7 +845,7 @@ export default {
// 表单校验
labelStyle
:
'
width:120px
'
,
showBatchImportDialog
:
false
,
// 显示批量导入弹窗
importList
:[],
importList
:
[],
exportLoading
:
false
,
// 装下单模板下载状态
contactChooseType
:
null
,
// 联系人选择对象consignor(发货人) 或者 consignee(收货人)
quickCreateType
:
null
,
// 快速新建客户类型,1发货人,2收货人
...
...
@@ -773,8 +854,8 @@ export default {
initing
:
true
,
// 初始化中,
updateChannel
:
false
,
// 是否更新渠道
offerData
:
[],
// 关联报价单
offerIdNochange
:
false
,
offerNumber
:
null
,
offerIdNochange
:
false
,
offerNumber
:
null
,
showAdress
:
false
,
// harvestMethod2: null,
/* lunchList: [
...
...
@@ -789,13 +870,13 @@ export default {
showFullConsignor
:
false
,
// 是否展示全部收货人信息
showFullConsignee
:
false
,
destCountryList
:[],
destCountryList
:
[],
destCityList
:
[],
selectedRouter
:
null
};
},
computed
:{
rules
(){
computed
:
{
rules
()
{
const
rules
=
{
marks
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
请填写唛头
'
)},
...
...
@@ -811,63 +892,63 @@ export default {
trigger
:
'
blur
'
}
],
consignorContactsId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
发货人不能为空
'
)}],
transportId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择运输方式
'
)}],
departureId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择始发城市
'
)}],
destCountryId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择目的国家
'
)}],
lineId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择路线
'
)}],
channelId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择出货渠道
'
)}],
deliveryDate
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择预计送货日期
'
)}],
consigneeAddress
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请填写详细地址
'
)}],
country
:
[{
required
:
true
,
message
:
this
.
$t
(
'
收货地区填写不完整
'
)}],
isCargoControl
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择是否控货
'
)}],
isCollection
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择代收货款
'
)}],
collectionProxy
:
[{
required
:
true
,
message
:
this
.
$t
(
'
代收货款不能为空
'
)}],
customsType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择单证报关
'
)}],
warehouseType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择入仓类型
'
)}],
harvestMethod
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择收货方式
'
)}]
consignorContactsId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
发货人不能为空
'
)}],
transportId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择运输方式
'
)}],
departureId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择始发城市
'
)}],
destCountryId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择目的国家
'
)}],
lineId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择路线
'
)}],
channelId
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择出货渠道
'
)}],
deliveryDate
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择预计送货日期
'
)}],
consigneeAddress
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请填写详细地址
'
)}],
country
:
[{
required
:
true
,
message
:
this
.
$t
(
'
收货地区填写不完整
'
)}],
isCargoControl
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择是否控货
'
)}],
isCollection
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择代收货款
'
)}],
collectionProxy
:
[{
required
:
true
,
message
:
this
.
$t
(
'
代收货款不能为空
'
)}],
customsType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择单证报关
'
)}],
warehouseType
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择入仓类型
'
)}],
harvestMethod
:
[{
required
:
true
,
message
:
this
.
$t
(
'
请选择收货方式
'
)}]
}
// 有收货人则添加收货人校验
if
(
this
.
hasConsignee
)
{
if
(
this
.
hasConsignee
)
{
rules
.
consigneeContactsId
=
[{
required
:
true
,
message
:
this
.
$t
(
'
收货人不能为空
'
)}]
}
return
rules
},
// 是否已完成入仓
inWarehouse
(){
inWarehouse
()
{
return
(
!!
this
.
form
.
inWarehouseState
&&
this
.
form
.
inWarehouseState
>
201
)
||
this
.
form
.
shipmentState
>
0
},
exportCityList
(){
exportCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
||
item
.
type
==
3
)
},
importCityList
(){
importCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
||
item
.
type
==
3
)
},
exportCityIds
(){
exportCityIds
()
{
let
ids
=
[]
this
.
exportCityList
.
forEach
(
item
=>
{
ids
.
push
(
item
.
id
)
})
return
ids
},
importCountryIds
(){
importCountryIds
()
{
let
ids
=
[]
this
.
destCountryList
.
forEach
(
item
=>
{
ids
.
push
(
item
.
guojia
)
})
return
ids
},
importCityIds
(){
importCityIds
()
{
let
ids
=
[]
this
.
destCityList
.
forEach
(
item
=>
{
ids
.
push
(
item
.
shi
)
})
return
ids
},
getDictData
(){
getDictData
()
{
return
(
type
,
value
)
=>
getDictData
(
type
,
value
)
||
{}
},
getDictDatas
(){
getDictDatas
()
{
return
getDictDatas
},
/* selectedRouter(){
...
...
@@ -876,45 +957,45 @@ export default {
return this.routerList.find(item => item.id == this.form.lineId)
}, */
// 送货上门
homeDeliveryService
(){
homeDeliveryService
()
{
return
this
.
selectedRouter
&&
this
.
selectedRouter
.
otherService
&&
this
.
selectedRouter
.
otherService
.
indexOf
(
'
2
'
)
>
-
1
},
// 代收货款(非控货订单,且路线开通了代收服务)
collectionProxy
(){
collectionProxy
()
{
return
!
this
.
form
.
isCargoControl
&&
this
.
selectedRouter
&&
this
.
selectedRouter
.
otherService
&&
this
.
selectedRouter
.
otherService
.
indexOf
(
'
3
'
)
>
-
1
},
// 根据渠道id显示渠道名
getChannelNameById
(){
getChannelNameById
()
{
return
channelId
=>
{
return
this
.
channelList
.
find
(
item
=>
item
.
channelId
==
channelId
)
?.
nameZh
return
this
.
channelList
.
find
(
item
=>
item
.
channelId
==
channelId
)?.
nameZh
}
},
// 当前运输方式
transport
(){
transport
()
{
return
this
.
transportList
.
find
(
item
=>
item
.
value
==
this
.
form
.
transportId
)
},
// 根据id获取优惠券
getCoupon
(){
getCoupon
()
{
return
couponId
=>
{
if
(
!
couponId
)
return
null
if
(
!
couponId
)
return
null
return
this
.
couponList
.
find
(
item
=>
item
.
couponId
==
couponId
)
}
},
currentcyMap
(){
currentcyMap
()
{
let
map
=
{}
this
.
currencyList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
item
.
titleZh
})
return
map
},
unitMap
(){
unitMap
()
{
let
map
=
{}
this
.
unitList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
item
.
titleZh
})
return
map
},
sum
(){
sum
()
{
let
sum
=
{
totalNum
:
new
Decimal
(
0
),
totalVolume
:
new
Decimal
(
0
),
...
...
@@ -922,7 +1003,7 @@ export default {
totalWorth
:
new
Decimal
(
0
),
totalQuatity
:
new
Decimal
(
0
)
}
if
(
!
this
.
form
||
!
this
.
form
.
orderItemVOList
)
return
sum
if
(
!
this
.
form
||
!
this
.
form
.
orderItemVOList
)
return
sum
this
.
form
.
orderItemVOList
.
forEach
(
item
=>
{
sum
.
totalNum
=
sum
.
totalNum
.
plus
(
item
.
num
||
0
)
sum
.
totalVolume
=
sum
.
totalVolume
.
plus
(
item
.
volume
||
0
)
...
...
@@ -933,51 +1014,51 @@ export default {
return
sum
},
// 总优惠金额
discount
(){
discount
()
{
return
0
},
// 是否编辑
editMode
(){
editMode
()
{
return
this
.
$route
.
path
.
indexOf
(
'
create
'
)
==
-
1
},
// 是否可以编辑商品基本信息(货值除外)
productEditable
(){
productEditable
()
{
// 非编辑模式 或者 未完成入仓
return
!
this
.
editMode
||
!
this
.
inWarehouse
},
// 路线开通的服务
routeOtherServices
(){
if
(
!
this
.
selectedRouter
||
!
this
.
selectedRouter
.
otherService
)
return
[]
routeOtherServices
()
{
if
(
!
this
.
selectedRouter
||
!
this
.
selectedRouter
.
otherService
)
return
[]
return
this
.
selectedRouter
.
otherService
.
split
(
'
,
'
)
},
// 是否可以添加商品
canAddProduct
(){
if
(
!
this
.
form
.
lineId
)
{
canAddProduct
()
{
if
(
!
this
.
form
.
lineId
)
{
return
false
}
// 如果是海空联运或者空运专线则必须选择渠道
if
(
this
.
transport
&&
this
.
transport
.
cssClass
==
'
channel
'
&&
!
this
.
form
.
channelId
)
{
if
(
this
.
transport
&&
this
.
transport
.
cssClass
==
'
channel
'
&&
!
this
.
form
.
channelId
)
{
return
false
}
return
true
},
// 显示的目的国
showDestCountryList
(){
showDestCountryList
()
{
return
this
.
destCountryList
},
showDestCityList
(){
if
(
!
this
.
form
.
destCountryId
)
return
this
.
destCityList
showDestCityList
()
{
if
(
!
this
.
form
.
destCountryId
)
return
this
.
destCityList
return
this
.
destCityList
.
filter
(
item
=>
item
.
guojia
===
this
.
form
.
destCountryId
)
||
[]
},
// 是否已起运(已起运不让修改报关方式)
isShipment
(){
return
[
326
,
328
,
329
,
330
,
332
,
391
,
392
,
426
,
428
,
432
].
indexOf
(
this
.
form
.
shipmentState
)
>
-
1
isShipment
()
{
return
[
326
,
328
,
329
,
330
,
332
,
391
,
392
,
426
,
428
,
432
].
indexOf
(
this
.
form
.
shipmentState
)
>
-
1
}
},
watch
:{
watch
:
{
// 如果无收货人则必须控货
hasConsignee
(
val
){
if
(
!
val
)
{
hasConsignee
(
val
)
{
if
(
!
val
)
{
this
.
$set
(
this
.
form
,
'
isCargoControl
'
,
true
)
// 无收货人且控货则默认发货人付款
this
.
$set
(
this
.
form
,
'
drawee
'
,
1
)
...
...
@@ -985,24 +1066,24 @@ export default {
this
.
$refs
.
form
?.
clearValidate
(
"
consigneeContactsId
"
)
}
},
ccIdArr
(
arr
){
ccIdArr
(
arr
)
{
this
.
$set
(
this
.
form
,
'
ccIds
'
,
arr
.
join
(
"
,
"
))
},
// 始发地
'
form.departureId
'
(
departureId
,
oldDepartureId
){
'
form.departureId
'
(
departureId
,
oldDepartureId
)
{
console
.
log
(
'
departureId
'
,
departureId
)
// this.getOpenedRouterList()
},
// 目的地
async
'
form.objectiveId
'
(
objectiveId
,
oldObjectiveId
){
async
'
form.objectiveId
'
(
objectiveId
,
oldObjectiveId
)
{
// 重新获取路线
// await this.getOpenedRouterList()
// 重新获取渠道
await
this
.
getChannelList
()
},
'
form.transportId
'
(
transportId
,
oldTransportId
){
'
form.transportId
'
(
transportId
,
oldTransportId
)
{
// 空运
if
(
!
this
.
initing
&&
(
this
.
form
.
transportId
==
4
||
this
.
form
.
transportId
==
3
))
{
if
(
!
this
.
initing
&&
(
this
.
form
.
transportId
==
4
||
this
.
form
.
transportId
==
3
))
{
this
.
$nextTick
(()
=>
{
console
.
log
(
'
切换空运,修改默认值
'
)
this
.
$set
(
this
,
'
form
'
,
Object
.
assign
(
this
.
form
,
{
...
...
@@ -1020,28 +1101,28 @@ export default {
} */
// 选择海运拼柜和海运整柜清空渠道值
if
(
transportId
==
1
||
transportId
==
2
)
{
if
(
transportId
==
1
||
transportId
==
2
)
{
this
.
$set
(
this
.
form
,
'
channelId
'
,
null
)
}
console
.
log
(
'
form.transportId
'
,
this
.
form
.
transportId
,
this
.
initing
)
if
(
!
this
.
initing
&&
transportId
==
3
)
{
if
(
!
this
.
initing
&&
transportId
==
3
)
{
// 如果是专线空运默认目的港清关选择我司
this
.
$set
(
this
.
form
,
'
portDestCustomsClear
'
,
1
)
}
// this.getOpenedRouterList()
},
'
form.channelId
'
(){
'
form.channelId
'
()
{
this
.
calculationPrice
()
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
// 选择渠道后需要筛选目的城市和线路
// 有点卡,改异步
this
.
$nextTick
(
async
()
=>
{
// 更新目的城市备选
await
this
.
getTradeCity
()
// 如果已选择城市,在切换后不可用则重置
if
(
this
.
form
.
objectiveId
&&
!
this
.
importCityList
.
find
(
item
=>
item
.
id
==
this
.
form
.
objectiveId
))
{
if
(
this
.
form
.
objectiveId
&&
!
this
.
importCityList
.
find
(
item
=>
item
.
id
==
this
.
form
.
objectiveId
))
{
this
.
$set
(
this
.
form
,
'
objectiveId
'
,
null
)
}
// 更新线路备选
...
...
@@ -1052,22 +1133,22 @@ export default {
} */
})
},
'
form.consigneeCountryCode
'
(){
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
'
form.consigneeCountryCode
'
()
{
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
},
'
form.consignorCountryCode
'
(){
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
'
form.consignorCountryCode
'
()
{
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
},
'
form.consigneePhone
'
(){
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
'
form.consigneePhone
'
()
{
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
},
'
form.consignorPhone
'
(){
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
'
form.consignorPhone
'
()
{
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
},
async
'
form.lineId
'
(
lineId
){
async
'
form.lineId
'
(
lineId
)
{
console
.
log
(
"
路线修改
"
,
lineId
)
let
router
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
lineId
)
if
(
!
router
)
{
if
(
!
router
)
{
return
}
/* this.$set(this.form, 'departureId', router.startCityId)
...
...
@@ -1091,56 +1172,56 @@ export default {
console.log('packageType', val, val.length)
this.$set(this.form, 'packageType', val ? val.join(',') : '')
}, */
'
form.isExternalWarehouse
'
(
isExternalWarehouse
){
'
form.isExternalWarehouse
'
(
isExternalWarehouse
)
{
// 勾选外部仓则添加一个默认的,取消则删除默认的空的
if
(
!
isExternalWarehouse
)
{
if
(
!
isExternalWarehouse
)
{
this
.
$set
(
this
.
form
,
'
externalWarehouseDtoList
'
,
[])
}
else
if
(
!
this
.
form
.
externalWarehouseDtoList
||
!
this
.
form
.
externalWarehouseDtoList
.
length
)
{
}
else
if
(
!
this
.
form
.
externalWarehouseDtoList
||
!
this
.
form
.
externalWarehouseDtoList
.
length
)
{
this
.
$set
(
this
.
form
,
'
externalWarehouseDtoList
'
,
[{}])
}
},
// 选择送货上门需要查询并填充默认地址
'
form.harvestMethod
'
(
harvestMethod
){
if
(
harvestMethod
==
2
&&
!
this
.
form
.
address
&&
this
.
form
.
consigneeId
)
{
'
form.harvestMethod
'
(
harvestMethod
)
{
if
(
harvestMethod
==
2
&&
!
this
.
form
.
address
&&
this
.
form
.
consigneeId
)
{
getCustomer
(
this
.
form
.
consigneeId
).
then
(
res
=>
{
if
(
res
.
data
.
address
)
{
if
(
res
.
data
.
address
)
{
this
.
$set
(
this
.
form
,
'
consigneeAddress
'
,
res
.
data
.
address
)
}
})
}
},
'
form.isCargoControl
'
(
isCargoControl
){
'
form.isCargoControl
'
(
isCargoControl
)
{
console
.
log
(
'
form.isCargoControl
'
,
this
.
form
.
isCargoControl
,
this
.
initing
)
if
(
!
this
.
initing
)
{
if
(
!
this
.
initing
)
{
this
.
$set
(
this
.
form
,
'
drawee
'
,
isCargoControl
&&
!
this
.
hasConsignee
?
1
:
2
)
}
this
.
setBllLandingPrice
(
'
form.isCargoControl
'
)
},
'
form.type
'
(
newVal
,
oldVal
){
'
form.type
'
(
newVal
,
oldVal
)
{
// 在选择预计送货日期后这里会触发,暂不清楚原因,所以加一个判断
/* if(newVal?.join(",") == oldVal?.join(",")){
return
} */
this
.
setBllLandingPrice
(
'
form.type
'
)
},
'
form.drawee
'
(
old
,
newVal
){
'
form.drawee
'
(
old
,
newVal
)
{
this
.
setBllLandingPrice
(
'
form.drawee
'
)
},
'
form.consigneeId
'
(){
'
form.consigneeId
'
()
{
this
.
setBllLandingPrice
(
'
form.consigneeId
'
)
},
'
form.consignorId
'
(){
'
form.consignorId
'
()
{
this
.
setBllLandingPrice
(
'
form.consignorId
'
)
},
// 目的港清关,1我司,2客户
'
form.portDestCustomsClear
'
(
portDestCustomsClear
){
'
form.portDestCustomsClear
'
(
portDestCustomsClear
)
{
// 我司默认多票
if
(
portDestCustomsClear
==
1
)
{
if
(
portDestCustomsClear
==
1
)
{
this
.
$set
(
this
.
form
,
'
deliveryWay
'
,
1
)
}
// 客户默认单票
if
(
portDestCustomsClear
==
2
)
{
if
(
portDestCustomsClear
==
2
)
{
this
.
$set
(
this
.
form
,
'
deliveryWay
'
,
2
)
}
},
...
...
@@ -1148,26 +1229,26 @@ export default {
console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList)
}, */
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter
(
val
){
if
(
!
val
)
{
selectedRouter
(
val
)
{
if
(
!
val
)
{
return
}
[
'
1
'
,
'
4
'
].
forEach
(
service
=>
{
if
(
this
.
routeOtherServices
.
indexOf
(
service
)
<
0
&&
this
.
form
.
type
.
indexOf
(
service
)
>
-
1
)
{
this
.
form
.
type
.
splice
(
this
.
form
.
type
.
findIndex
(
item
=>
item
==
service
),
1
)
if
(
this
.
routeOtherServices
.
indexOf
(
service
)
<
0
&&
this
.
form
.
type
.
indexOf
(
service
==
4
?
2
:
service
)
>
-
1
)
{
this
.
form
.
type
.
splice
(
this
.
form
.
type
.
findIndex
(
item
=>
item
==
(
service
==
4
?
2
:
service
)
),
1
)
}
})
},
// 送货上门变化后需要判断当前选择的收货方式,如果选择了送货上门但是当前不支持送货上门则需要重置
homeDeliveryService
(
enable
){
if
(
!
enable
&&
this
.
form
.
harvestMethod
!=
1
)
{
homeDeliveryService
(
enable
)
{
if
(
!
enable
&&
this
.
form
.
harvestMethod
!=
1
)
{
this
.
form
.
harvestMethod
=
1
}
},
// 变更渠道需要显示工作流组件
updateChannel
(
updateChannel
){
if
(
updateChannel
)
{
updateChannel
(
updateChannel
)
{
if
(
updateChannel
)
{
this
.
$set
(
this
,
'
showWorkFlow
'
,
true
)
}
},
...
...
@@ -1175,17 +1256,17 @@ export default {
this.$set(this.form, 'transportId', transportType ? +transportType : undefined)
}*/
},
activated
(){
activated
()
{
console
.
log
(
"
%c activated
"
,
"
color: red
"
)
if
(
this
.
$route
.
query
.
id
!=
this
.
form
.
id
)
{
if
(
this
.
$route
.
query
.
id
!=
this
.
form
.
id
)
{
console
.
log
(
"
activated 加载订单数据
"
)
this
.
getOrder
()
}
let
transportType
=
undefined
if
(
this
.
$route
.
query
.
transportType
)
{
if
(
this
.
$route
.
query
.
transportType
)
{
transportType
=
+
this
.
$route
.
query
.
transportType
}
if
(
transportType
!=
this
.
transportId
)
{
if
(
transportType
!=
this
.
transportId
)
{
this
.
$set
(
this
.
form
,
'
transportId
'
,
transportType
)
}
...
...
@@ -1213,17 +1294,17 @@ export default {
this
.
unitList
=
(
await
getUnitList
()).
data
this
.
transportList
=
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
)
if
(
this
.
$route
.
query
.
transportType
)
{
if
(
this
.
$route
.
query
.
transportType
)
{
this
.
$set
(
this
.
form
,
'
transportId
'
,
+
this
.
$route
.
query
.
transportType
)
}
// 变更出货渠道
if
(
this
.
$route
.
query
.
updateChannel
)
{
if
(
this
.
$route
.
query
.
updateChannel
)
{
this
.
updateChannel
=
true
}
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
console
.
log
(
'
created 加载订单数据
'
)
this
.
getOrder
()
}
else
{
}
else
{
await
this
.
getTradeCity
()
this
.
addProduct
()
this
.
$nextTick
(()
=>
{
...
...
@@ -1232,25 +1313,25 @@ export default {
}
},
methods
:
{
async
getTradeCity
(
a
){
async
getTradeCity
(
a
)
{
let
query
=
{}
if
(
this
.
form
.
channelId
)
{
if
(
this
.
form
.
channelId
)
{
query
.
channelId
=
this
.
form
.
channelId
}
this
.
tradeCityList
=
(
await
getTradeCityList
(
query
)).
data
},
async
getChannelList
(){
async
getChannelList
()
{
let
query
=
{
cityId
:
this
.
form
.
objectiveId
,
lineId
:
this
.
form
.
lineId
}
this
.
channelList
=
(
await
getChannelList
(
query
)).
data
},
onTableMounted
(
e
){
onTableMounted
(
e
)
{
// console.warn('onTableMounted', e)
},
async
getOrder
(){
if
(
this
.
form
.
orderId
==
this
.
$route
.
query
.
id
)
{
async
getOrder
()
{
if
(
this
.
form
.
orderId
==
this
.
$route
.
query
.
id
)
{
console
.
log
(
'
加载中或者已加载此订单数据,不重复加载
'
,
this
.
initing
,
this
.
form
.
orderId
,
this
.
$route
.
query
.
id
)
return
}
...
...
@@ -1264,9 +1345,9 @@ export default {
await
this
.
getTradeCity
()
await
this
.
getOpenedRouterList
()
this
.
selectedRouter
=
this
.
routerList
.
find
(
item
=>
item
.
id
===
this
.
form
.
lineId
)
if
(
this
.
selectedRouter
)
{
if
(
this
.
selectedRouter
)
{
this
.
form
.
destCountryId
=
this
.
selectedRouter
.
destCountryId
}
else
console
.
log
(
"
未找到选择的路线
"
,
this
.
routerList
,
this
.
selectedRouter
)
}
else
console
.
log
(
"
未找到选择的路线
"
,
this
.
routerList
,
this
.
selectedRouter
)
console
.
log
(
"
国家ID
"
,
this
.
form
.
destCountryId
)
...
...
@@ -1280,7 +1361,7 @@ export default {
this
.
form
.
packageTypeArr
=
this
.
form
.
packageType
?
this
.
form
.
packageType
.
split
(
'
,
'
).
filter
(
item
=>
item
!=
''
)
:
[]
// 每次编辑订单详情需要实时获取发货人当前信息
let
customer
=
null
if
(
res
.
data
.
consignorVO
)
{
if
(
res
.
data
.
consignorVO
)
{
this
.
$set
(
this
.
form
,
'
consignorCompany
'
,
res
.
data
.
consignorVO
.
company
)
this
.
$set
(
this
.
form
,
'
consignorCompanyEn
'
,
res
.
data
.
consignorVO
.
companyEn
)
this
.
$set
(
this
.
form
,
'
consignorContactsId
'
,
res
.
data
.
consignorVO
.
customerContactsId
)
...
...
@@ -1293,7 +1374,7 @@ export default {
customer
=
getCustomer
(
res
.
data
.
consignorVO
.
customerId
)
}
if
(
res
.
data
.
consigneeVO
)
{
if
(
res
.
data
.
consigneeVO
)
{
this
.
$set
(
this
.
form
,
'
consigneeCompany
'
,
res
.
data
.
consigneeVO
.
company
)
this
.
$set
(
this
.
form
,
'
consigneeCompanyEn
'
,
res
.
data
.
consigneeVO
.
companyEn
)
this
.
$set
(
this
.
form
,
'
consigneeContactsId
'
,
res
.
data
.
consigneeVO
.
customerContactsId
)
...
...
@@ -1308,10 +1389,10 @@ export default {
// res.data.noConsignee 当前订单发货人是否允许无收货
//
if
(
customer
)
{
if
(
customer
)
{
// 最新的客户设置信息,是否允许控货无收货人
this
.
noConsignee
=
customer
.
noConsignee
}
else
{
}
else
{
// 默认不允许控货无收货人
this
.
noConsignee
=
false
}
...
...
@@ -1319,31 +1400,31 @@ export default {
this
.
hasConsignee
=
!!
res
.
data
.
consigneeVO
// 如果订单无收货人,但是最新的发货人不允许无收货人则重置状态
if
(
this
.
noConsignee
&&
!
this
.
hasConsignee
)
{
if
(
this
.
noConsignee
&&
!
this
.
hasConsignee
)
{
// 最新的发货人不允许无收货人,则重置为有收货人
this
.
hasConsignee
=
true
// 如果发货人不允许无收货人,则更新是否允许无收货人状态
this
.
noConsignee
=
false
}
if
(
this
.
form
.
channelId
==
0
)
{
if
(
this
.
form
.
channelId
==
0
)
{
delete
this
.
form
.
channelId
}
if
(
res
.
data
.
ccIds
)
{
if
(
res
.
data
.
ccIds
)
{
this
.
ccIdArr
=
res
.
data
.
ccIds
.
split
(
"
,
"
).
filter
(
item
=>
item
&&
item
!=
''
)
}
// 审核中需要显示流程表单
if
(
this
.
form
.
applyStaus
==
1
)
{
if
(
this
.
form
.
applyStaus
==
1
)
{
this
.
showWorkFlow
=
true
}
// 如果是自定义付款人,则需要同步具体发货人信息
if
(
this
.
form
.
drawee
==
3
)
{
if
(
this
.
form
.
drawee
==
3
)
{
console
.
log
(
'
同步自定义付款人信息
'
,
JSON
.
stringify
(
this
.
customDraweeList
))
this
.
customDraweeList
.
forEach
(
item
=>
{
console
.
log
(
item
.
name
,
this
.
form
.
customDraweeVOList
.
find
(
it
=>
it
.
name
==
item
.
name
)?.
value
,
item
.
value
)
console
.
log
(
item
.
name
,
this
.
form
.
customDraweeVOList
.
find
(
it
=>
it
.
name
==
item
.
name
)?.
value
,
item
.
value
)
item
.
value
=
this
.
form
.
customDraweeVOList
.
find
(
it
=>
it
.
name
==
item
.
name
)?.
value
||
item
.
value
})
console
.
log
(
'
同步自定义付款人信息
'
,
this
.
customDraweeList
,
this
.
form
.
customDraweeVOList
)
...
...
@@ -1358,7 +1439,7 @@ export default {
})
// 已入仓后,必填字段修改则需要显示审批流
if
(
this
.
inWarehouse
)
{
if
(
this
.
inWarehouse
)
{
Object
.
keys
(
this
.
rules
).
forEach
(
field
=>
{
console
.
log
(
"
watch
"
,
field
)
this
.
$watch
(
`form.
${
field
}
`
,
()
=>
{
...
...
@@ -1368,13 +1449,13 @@ export default {
}
// 在初始化结束后transportId还会发生一次变化导致目的港清关被重置,所以需要延迟一下。暂不清楚原因
setTimeout
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
'
transportId
'
,
this
.
form
.
transportId
)
console
.
log
(
'
portDestCustomsClear
'
,
this
.
form
.
portDestCustomsClear
,
res
.
data
.
portDestCustomsClear
)
if
(
res
.
data
.
portDestCustomsClear
)
{
if
(
res
.
data
.
portDestCustomsClear
)
{
this
.
$set
(
this
.
form
,
'
portDestCustomsClear
'
,
res
.
data
.
portDestCustomsClear
)
}
if
(
res
.
data
.
deliveryWay
)
{
if
(
res
.
data
.
deliveryWay
)
{
this
.
$set
(
this
.
form
,
'
deliveryWay
'
,
res
.
data
.
deliveryWay
)
}
this
.
$nextTick
(()
=>
{
...
...
@@ -1400,23 +1481,23 @@ export default {
this
.
initing
=
false
})
},
onContactChoose
(
contact
){
onContactChoose
(
contact
)
{
console
.
log
(
'
选择联系人
'
,
contact
)
if
(
!
this
.
contactChooseType
&&
!
this
.
quickCreateType
)
return
if
(
!
this
.
contactChooseType
&&
this
.
quickCreateType
)
{
if
(
!
this
.
contactChooseType
&&
!
this
.
quickCreateType
)
return
if
(
!
this
.
contactChooseType
&&
this
.
quickCreateType
)
{
this
.
contactChooseType
=
this
.
quickCreateType
==
0
?
'
consignor
'
:
'
consignee
'
}
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Company
'
,
contact
.
company
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
CompanyEn
'
,
contact
.
companyEn
||
''
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
CompanyEn
'
,
contact
.
companyEn
||
''
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
ContactsId
'
,
contact
.
customerContactsId
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
CountryCode
'
,
contact
.
areaCode
.
replace
(
'
+
'
,
''
))
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Email
'
,
contact
.
email
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Id
'
,
contact
.
customerId
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Name
'
,
contact
.
contactsName
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
NameEn
'
,
contact
.
contactsNameEn
||
''
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
NameEn
'
,
contact
.
contactsNameEn
||
''
)
this
.
$set
(
this
.
form
,
this
.
contactChooseType
+
'
Phone
'
,
contact
.
phoneNew
)
if
(
this
.
contactChooseType
==
'
consignor
'
)
{
if
(
this
.
contactChooseType
==
'
consignor
'
)
{
this
.
noConsignee
=
contact
.
noConsignee
// 如果允许无收货人,则默认无收货人、控货
...
...
@@ -1425,25 +1506,25 @@ export default {
this.hasConsignee = false
}*/
// 如果发货人不允许无收货人,则重置为有收货人
if
(
!
this
.
noConsignee
&&
!
this
.
hasConsignee
)
{
if
(
!
this
.
noConsignee
&&
!
this
.
hasConsignee
)
{
this
.
$set
(
this
,
'
hasConsignee
'
,
true
)
}
// 如果默认付款则设置为发货人付款
if
(
contact
.
defaultPay
)
{
if
(
contact
.
defaultPay
)
{
this
.
$set
(
this
.
form
,
'
drawee
'
,
1
)
}
}
this
.
contactChooseType
=
null
this
.
quickCreateType
=
null
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
if
(
this
.
form
.
lineId
)
this
.
getOfferData
()
},
upload
(
e
){
upload
(
e
)
{
console
.
log
({
upload
:
e
})
let
form
=
new
FormData
()
form
.
append
(
'
file
'
,
e
.
file
)
orderImport
(
form
).
then
(
res
=>
{
if
(
!
res
.
data
.
list
.
length
)
{
if
(
!
res
.
data
.
list
.
length
)
{
return
this
.
$message
.
error
(
'
无有效数据
'
)
}
...
...
@@ -1452,7 +1533,7 @@ export default {
})
},
addToProductList
(){
addToProductList
()
{
console
.
log
(
'
addToProductList
'
)
this
.
importList
.
forEach
(
item
=>
{
this
.
form
.
orderItemVOList
.
push
({
...
...
@@ -1462,63 +1543,64 @@ export default {
quantity
:
item
.
quantity
,
volume
:
item
.
volume
,
weight
:
item
.
weight
,
prodAttrArr
:
[]
prodAttrArr
:
[]
})
})
// 重置
this
.
importList
=
[]
this
.
showBatchImportDialog
=
false
},
downloadTpl
(){
downloadTpl
()
{
this
.
exportLoading
=
true
;
exportPackingList
().
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
this
.
$t
(
'
装箱单模板
'
)
+
'
.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
});
},
setLink
(
row
){
setLink
(
row
)
{
this
.
$prompt
(
this
.
$t
(
'
请输入商品链接
'
),
{
inputValue
:
row
.
link
}).
then
(({
value
})
=>
{
this
.
$set
(
row
,
'
link
'
,
value
)
})
},
// 检查正整数
checkPositiveInterge
(
row
,
field
){
checkPositiveInterge
(
row
,
field
)
{
console
.
log
(
'
checkPositiveInterge
'
,
field
,
row
[
field
])
row
[
field
]
=
row
[
field
].
toString
().
replace
(
/
[^\d]
/g
,
''
)
},
onProductChange
(
row
,
product
){
onProductChange
(
row
,
product
)
{
console
.
log
(
product
)
// 如果是清除商品
if
(
!
product
)
{
if
(
!
product
)
{
row
.
fee
=
null
row
.
prodAttrArr
=
[]
return
false
}
// 没有orderItemId则表示新增的,否则就是编辑回显的
// row.updated 表示用户操作了,用来区分是自动回显还是用户选择商品
if
(
!
row
.
orderItemId
||
row
.
updated
)
{
if
(
!
row
.
orderItemId
||
row
.
updated
)
{
row
.
prodAttrArr
=
!
product
?
[]
:
product
.
attrId
.
split
(
'
,
'
).
filter
(
item
=>
item
!==
''
).
map
(
item
=>
+
item
)
}
row
.
prodTitleEn
=
product
.
titleEn
row
.
prodTitleZh
=
product
.
titleZh
this
.
calculationPrice
()
},
onAreaChange
(
type
,
val
){
onAreaChange
(
type
,
val
)
{
this
.
$set
(
this
.
form
,
type
,
val
)
},
// 生成快递单号
getOrderCourierNumber
(){
getOrderCourierNumber
()
{
getOrderCourierNumber
().
then
(
res
=>
{
this
.
$set
(
this
.
form
,
'
number
'
,
res
.
data
)
})
},
onProductAttrChange
(
row
,
attr
){
onProductAttrChange
(
row
,
attr
)
{
console
.
log
(
attr
)
},
addProduct
(
data
){
addProduct
(
data
)
{
this
.
form
.
orderItemVOList
.
push
(
data
||
{
prodAttrArr
:
[],
prodAttrArr
:
[],
prodId
:
null
,
worth
:
''
,
volume
:
''
,
...
...
@@ -1527,31 +1609,31 @@ export default {
})
},
// 更新路线并打印来源
updateRoutes
(
fr
){
updateRoutes
(
fr
)
{
console
.
log
(
"
%cupdateRotutes
"
,
"
color: blue
"
,
fr
)
return
this
.
getOpenedRouterList
()
},
// 获取路线
async
getOpenedRouterList
(){
async
getOpenedRouterList
()
{
let
params
=
{}
if
(
this
.
form
.
departureId
)
{
if
(
this
.
form
.
departureId
)
{
params
.
startCityId
=
this
.
form
.
departureId
}
if
(
this
.
form
.
destCountryId
)
{
if
(
this
.
form
.
destCountryId
)
{
params
.
destCountryId
=
this
.
form
.
destCountryId
}
if
(
this
.
form
.
objectiveId
)
{
if
(
this
.
form
.
objectiveId
)
{
params
.
destCityId
=
this
.
form
.
objectiveId
}
if
(
this
.
form
.
transportId
)
{
if
(
this
.
form
.
transportId
)
{
params
.
transportType
=
this
.
form
.
transportId
}
if
(
this
.
form
.
channelId
)
{
if
(
this
.
form
.
channelId
)
{
params
.
channelId
=
this
.
form
.
channelId
}
console
.
log
(
"
获取路线,参数
"
,
params
)
// 始发,目的和运输方式都没有的时候不获取
if
(
!
params
.
startCityId
&&
!
params
.
destCountryId
&&
!
params
.
destCityId
&&
!
params
.
transportType
)
return
false
if
(
!
params
.
startCityId
&&
!
params
.
destCountryId
&&
!
params
.
destCityId
&&
!
params
.
transportType
)
return
false
return
getOpenedRouterList
(
params
).
then
(
res
=>
{
this
.
routerList
=
res
.
data
.
filter
(
item
=>
{
return
this
.
exportCityIds
.
indexOf
(
item
.
startCityId
)
>
-
1
&&
this
.
importCountryIds
.
indexOf
(
item
.
destCountryId
)
>
-
1
&&
(
this
.
importCityIds
&&
this
.
importCityIds
.
indexOf
(
item
.
destCityId
)
>
-
1
)
...
...
@@ -1564,9 +1646,9 @@ export default {
}
])
// 如果已选择的线路ID不在上述路线列表里则重置
if
(
this
.
form
.
lineId
)
{
if
(
this
.
form
.
lineId
)
{
this
.
selectedRouter
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
this
.
form
.
lineId
)
if
(
!
this
.
selectedRouter
)
{
if
(
!
this
.
selectedRouter
)
{
console
.
log
(
`获取到的路线未找到原路线lineId:
${
this
.
form
.
lineId
}
,重置为null`
)
this
.
$set
(
this
.
form
,
'
lineId
'
,
null
)
}
...
...
@@ -1574,16 +1656,16 @@ export default {
})
},
// 计算体积
calcVolume
(
row
){
if
(
!
row
.
boxGauge
||
!
row
.
num
)
return
false
try
{
calcVolume
(
row
)
{
if
(
!
row
.
boxGauge
||
!
row
.
num
)
return
false
try
{
row
.
volume
=
(
eval
(
row
.
boxGauge
)
*
row
.
num
).
toFixed
(
2
)
}
catch
(
e
)
{
}
catch
(
e
)
{
row
.
volume
=
''
}
},
// 删除一条产品
delProduct
(
index
){
delProduct
(
index
)
{
this
.
$confirm
(
this
.
$t
(
'
确定删除此条内容么?
'
))
.
then
(
res
=>
{
this
.
form
.
orderItemVOList
.
splice
(
index
,
1
)
...
...
@@ -1620,8 +1702,8 @@ export default {
return
this
.
$showFormValidateErrors
(
errors
)
}
if
(
this
.
form
.
harvestMethod
==
2
)
{
if
(
!
this
.
form
.
country
||
!
this
.
form
.
province
||
!
this
.
form
.
city
)
{
if
(
this
.
form
.
harvestMethod
==
2
)
{
if
(
!
this
.
form
.
country
||
!
this
.
form
.
province
||
!
this
.
form
.
city
)
{
return
this
.
$notify
({
title
:
this
.
$t
(
'
提示
'
),
message
:
this
.
$t
(
"
收货地区填写不完整
"
),
...
...
@@ -1632,12 +1714,12 @@ export default {
let
isInclude
=
false
this
.
form
.
orderItemVOList
.
map
(
item
=>
{
//如果商品特性包含不接受货物,不能创建订单或修改订单
if
(
item
.
prodAttrArr
.
indexOf
(
4
)
!=-
1
)
{
if
(
item
.
prodAttrArr
.
indexOf
(
4
)
!=
-
1
)
{
isInclude
=
true
}
item
.
prodAttrIds
=
item
.
prodAttrArr
.
join
(
'
,
'
)
})
if
(
isInclude
)
{
if
(
isInclude
)
{
return
this
.
$notify
({
title
:
this
.
$t
(
'
提示
'
),
message
:
this
.
$t
(
"
订单包含不接受货物,请检查
"
),
...
...
@@ -1645,17 +1727,17 @@ export default {
});
}
this
.
transportList
.
map
(
item
=>
{
if
(
item
.
_enabled
)
{
if
(
item
.
_enabled
)
{
item
.
lineIds
=
Array
.
from
(
item
.
lineIdSet
).
join
(
'
,
'
)
item
.
channelIds
=
Array
.
from
(
item
.
channelIdSet
).
join
(
'
,
'
)
}
})
this
.
form
.
packageType
=
this
.
form
.
packageTypeArr
.
join
(
'
,
'
)
for
(
const
i
in
this
.
form
.
orderItemVOList
)
{
for
(
const
i
in
this
.
form
.
orderItemVOList
)
{
const
item
=
this
.
form
.
orderItemVOList
[
i
]
if
(
!
item
.
prodId
)
{
return
this
.
$message
.
error
(
this
.
$t
(
`第
${
Number
(
i
)
+
1
}
行未选择商品`
,
i
+
1
))
if
(
!
item
.
prodId
)
{
return
this
.
$message
.
error
(
this
.
$t
(
`第
${
Number
(
i
)
+
1
}
行未选择商品`
,
i
+
1
))
}
}
...
...
@@ -1665,13 +1747,13 @@ export default {
}
// 24-02-08 新需求 当付款人=发货人且提单显示价格,需要弹出提示,付款人=发货人,请再次确认提单是否显示价格明细,是则允许提交订单,否则留在当前页面
// https://zentao.test.jdshangmen.com/task-view-3442.html
if
(
+
this
.
form
.
drawee
===
1
&&
this
.
form
.
displayBillLadingPrice
&&
!
this
.
updateChannel
)
{
if
(
+
this
.
form
.
drawee
===
1
&&
this
.
form
.
displayBillLadingPrice
&&
!
this
.
updateChannel
)
{
await
this
.
$confirm
(
this
.
$t
(
'
付款人=发货人,请再次确认提单是否显示价格明细
'
))
}
// 校验手机号跟目的国是否匹配
if
(
this
.
hasConsignee
&&
this
.
form
.
consigneeCountryCode
&&
this
.
form
.
consigneePhone
)
{
if
(
this
.
form
.
isCargoControl
&&
(
this
.
form
.
consigneeCountryCode
==
"
86
"
||
this
.
form
.
consigneeCountryCode
==
"
+86
"
)){
if
(
this
.
hasConsignee
&&
this
.
form
.
consigneeCountryCode
&&
this
.
form
.
consigneePhone
)
{
if
(
this
.
form
.
isCargoControl
&&
(
this
.
form
.
consigneeCountryCode
==
"
86
"
||
this
.
form
.
consigneeCountryCode
==
"
+86
"
))
{
this
.
$message
.
error
(
this
.
$t
(
"
控货订单的收货人手机号不能是国内号码
"
))
return
}
...
...
@@ -1680,14 +1762,14 @@ export default {
currencyId
:
this
.
form
.
destCountryId
})
// 并不一致则提示
if
(
!
res
.
data
)
{
if
(
!
res
.
data
)
{
await
this
.
$confirm
(
this
.
$t
(
'
电话所在国与目的国不一致,请检查
'
))
}
}
// 修改的提交
if
(
this
.
form
.
orderId
)
{
if
(
this
.
form
.
tidanNo
)
{
if
(
this
.
form
.
tidanNo
)
{
await
this
.
$confirm
(
this
.
$t
(
'
提单已制作,如需修改请联系客服
'
))
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
...
...
@@ -1708,7 +1790,7 @@ export default {
let
data
=
Object
.
assign
({
consigneeId
:
this
.
consigneeContact
.
customerId
,
consignorId
:
this
.
consignorContact
.
customerId
,
customerId
:
this
.
consignorContact
.
customerId
,
customerId
:
this
.
consignorContact
.
customerId
,
// couponIds: coupons.join(","),
},
this
.
form
,
{
customDraweeVOList
:
this
.
customDraweeList
,
...
...
@@ -1727,7 +1809,7 @@ export default {
this
.
form
=
{...
makeDefaultFormData
()}
this
.
routerList
=
[]
this
.
addProduct
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
initing
=
false
this
.
$nextTick
(()
=>
{
this
.
$redirect
(
'
success?orderId=
'
+
response
.
data
)
...
...
@@ -1737,26 +1819,26 @@ export default {
});
},
// 计算商品运费(根据货值计算保费)
calculationPrice
(){
calculationPrice
()
{
let
calcable
=
true
if
(
!
this
.
form
.
orderItemVOList
.
length
)
return
false
if
(
!
this
.
form
.
orderItemVOList
.
length
)
return
false
this
.
form
.
orderItemVOList
.
forEach
(
item
=>
{
if
(
!
item
.
prodId
)
{
if
(
!
item
.
prodId
)
{
calcable
=
false
}
})
console
.
log
(
'
calculationPrice
'
,
calcable
)
if
(
this
.
calculating
||
!
calcable
)
return
false
if
(
this
.
calculating
||
!
calcable
)
return
false
this
.
calculating
=
true
console
.
log
(
'
calculating --->
'
)
const
data
=
{
lineId
:
this
.
form
.
lineId
,
transportId
:
this
.
form
.
transportId
,
channelId
:
[
3
,
4
].
indexOf
(
this
.
form
.
transportId
)
>
-
1
?
this
.
form
.
channelId
:
undefined
,
channelId
:
[
3
,
4
].
indexOf
(
this
.
form
.
transportId
)
>
-
1
?
this
.
form
.
channelId
:
undefined
,
prodConditionParamList
:
this
.
getProductListWithDefaultValue
(),
orderType
:
this
.
form
.
orderType
}
if
(
this
.
form
.
channelId
)
{
if
(
this
.
form
.
channelId
)
{
data
.
channelId
=
this
.
form
.
channelId
}
calculationPrice
(
data
).
then
(
res
=>
{
...
...
@@ -1769,7 +1851,7 @@ export default {
})
},
// 体积。件数,数量,重量为选填,但是接口确实必填,所以生成一个副本并赋予默认值
getProductListWithDefaultValue
(){
getProductListWithDefaultValue
()
{
let
arr
=
[]
this
.
form
.
orderItemVOList
.
forEach
(
item
=>
{
// 商品信息只要商品id、品牌收费模式、件数、数量、体积、重量、货值、包装类型即可
...
...
@@ -1786,10 +1868,10 @@ export default {
packageType: item.packageType,
unit: item.unit
} */
if
(
!
tmp
.
volume
)
tmp
.
volume
=
0
if
(
!
tmp
.
weight
)
tmp
.
weight
=
0
if
(
!
tmp
.
quantity
)
tmp
.
quantity
=
0
if
(
!
tmp
.
num
)
tmp
.
num
=
0
if
(
!
tmp
.
volume
)
tmp
.
volume
=
0
if
(
!
tmp
.
weight
)
tmp
.
weight
=
0
if
(
!
tmp
.
quantity
)
tmp
.
quantity
=
0
if
(
!
tmp
.
num
)
tmp
.
num
=
0
tmp
.
orderType
=
item
.
orderItemType
delete
tmp
.
fee
delete
tmp
.
couponInfo
...
...
@@ -1831,9 +1913,9 @@ export default {
getOfferNumber
(
id
)
{
const
that
=
this
that
.
offerIdNochange
=
false
getOfferCheck
({
orderId
:
id
}).
then
(
response
=>
{
if
(
!
response
.
data
)
return
if
(
that
.
offerData
.
length
==
0
)
{
getOfferCheck
({
orderId
:
id
}).
then
(
response
=>
{
if
(
!
response
.
data
)
return
if
(
that
.
offerData
.
length
==
0
)
{
that
.
offerData
.
push
(
response
.
data
)
}
that
.
offerIdNochange
=
true
...
...
@@ -1842,17 +1924,17 @@ export default {
})
},
// 设置默认的提货单是否显示价格
setBllLandingPrice
(
src
){
setBllLandingPrice
(
src
)
{
console
.
log
(
"
更新默认的提单是否显示价格:src
"
+
src
,
this
.
initing
,
{...
this
.
form
});
if
(
this
.
form
.
orderId
&&
this
.
initing
)
return
if
(
this
.
form
.
orderId
&&
this
.
initing
)
return
// 240224 微信反馈
// 不好意思,这写错了,付款人=发货人----提单价格默认否;付款人=收货人,提交价格默认是
if
(
this
.
form
.
drawee
==
1
)
{
if
(
this
.
form
.
drawee
==
1
)
{
this
.
form
.
displayBillLadingPrice
=
false
return
}
if
(
this
.
form
.
drawee
==
2
)
{
if
(
this
.
form
.
drawee
==
2
)
{
this
.
form
.
displayBillLadingPrice
=
true
return
}
...
...
@@ -1861,17 +1943,17 @@ export default {
// 控货订单归属发货人
// 非控货订单 + 付款人为发货人 归属发货人, 其他归属收货人
let
customerId
=
null
if
(
this
.
form
.
type
==
2
||
this
.
form
.
isCargoControl
==
1
||
this
.
form
.
drawee
==
2
)
{
if
(
this
.
form
.
type
==
2
||
this
.
form
.
isCargoControl
==
1
||
this
.
form
.
drawee
==
2
)
{
customerId
=
this
.
form
.
consignorId
}
else
{
}
else
{
customerId
=
this
.
form
.
consigneeId
}
if
(
!
customerId
)
return
if
(
!
customerId
)
return
console
.
log
(
'
原归属人
'
,
this
.
displayBillLadingPriceFrom
,
'
新归属人
'
,
customerId
)
console
.
log
(
'
原归属人
'
,
this
.
displayBillLadingPriceFrom
,
'
新归属人
'
,
customerId
)
// 如果当前的提单价格设置来自同一个客户则不在查询
if
(
this
.
displayBillLadingPriceFrom
==
customerId
)
return
;
if
(
this
.
displayBillLadingPriceFrom
==
customerId
)
return
;
this
.
displayBillLadingPriceFrom
=
customerId
// 获取客户信息
...
...
@@ -1884,7 +1966,7 @@ export default {
handleChangeDestCountry
(
val
)
{
console
.
log
(
"
handleChangeDestCountry
"
,
val
)
this
.
form
.
destCountryId
=
val
if
(
this
.
form
.
destCountryId
)
{
if
(
this
.
form
.
destCountryId
)
{
this
.
form
.
objectiveId
=
null
this
.
form
.
lineId
=
null
this
.
selectedRouter
=
null
...
...
@@ -1892,9 +1974,9 @@ export default {
}
},
// 切换目的城市
async
handleChangeDestCity
(
val
){
async
handleChangeDestCity
(
val
)
{
this
.
form
.
objectiveId
=
val
if
(
this
.
form
.
objectiveId
)
{
if
(
this
.
form
.
objectiveId
)
{
this
.
form
.
lineId
=
null
this
.
selectedRouter
=
null
this
.
form
.
destCountryId
=
this
.
destCityList
.
find
(
item
=>
item
.
shi
===
val
)?.
guojia
...
...
@@ -1903,12 +1985,12 @@ export default {
await
this
.
updateRoutes
(
'
handleChangeDestCity
'
)
},
// 切换路线
setLineId
(
lineId
){
setLineId
(
lineId
)
{
this
.
form
.
lineId
=
lineId
this
.
handleChangeLineId
()
},
// 切换线路回调
async
handleChangeLineId
(){
async
handleChangeLineId
()
{
await
this
.
$nextTick
()
this
.
selectedRouter
=
this
.
routerList
.
find
(
item
=>
item
.
id
===
this
.
form
.
lineId
)
console
.
log
(
"
handleChangeLineId
"
,
...
...
@@ -1916,7 +1998,7 @@ export default {
"
目的市
"
,
this
.
selectedRouter
?.
destCityId
,
"
目的国
"
,
this
.
selectedRouter
?.
destCountryId
,
"
始发市
"
,
this
.
selectedRouter
?.
startCityId
)
if
(
this
.
form
.
lineId
)
{
if
(
this
.
form
.
lineId
)
{
this
.
form
.
objectiveId
=
this
.
selectedRouter
?.
destCityId
this
.
form
.
destCountryId
=
this
.
selectedRouter
?.
destCountryId
this
.
form
.
departureId
=
this
.
selectedRouter
?.
startCityId
...
...
@@ -1926,21 +2008,25 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.w-380
{
.w-380
{
width
:
380px
;
}
.card-title
{
.card-title
{
font-size
:
18px
;
display
:
flex
;
.card-name
{
.card-name
{
flex
:
1
;
}
}
.form-section
{
.contact
{
.form-section
{
.contact
{
display
:
flex
;
align-items
:
center
;
img
.phonebook
{
img
.phonebook
{
width
:
30px
;
height
:
30px
;
margin-left
:
10px
;
...
...
@@ -1949,17 +2035,21 @@ export default {
}
}
::v-deep
.product-list
.el-form-item__error
{
::v-deep
.product-list
.el-form-item__error
{
position
:
static
;
}
::v-deep
th
.el-table__cell
.cell
{
::v-deep
th
.el-table__cell
.cell
{
white-space
:
nowrap
;
.red
{
.red
{
color
:
red
;
}
}
::v-deep
.right-label
{
.el-form-item__label
{
::v-deep
.right-label
{
.el-form-item__label
{
width
:
150px
;
display
:
inline-flex
;
justify-content
:
flex-end
;
...
...
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