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
63bc66f0
Commit
63bc66f0
authored
Mar 10, 2025
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求134后台-集运-包裹列表-转运
parent
74eb8c79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
332 additions
and
113 deletions
+332
-113
cons.js
src/api/ecw/cons.js
+9
-0
index.vue
src/views/ecw/cons/index.vue
+210
-113
edit.vue
src/views/ecw/order/edit.vue
+113
-0
No files found.
src/api/ecw/cons.js
View file @
63bc66f0
...
@@ -50,6 +50,15 @@ export function getCons(id) {
...
@@ -50,6 +50,15 @@ export function getCons(id) {
})
})
}
}
// 获得集运包裹转运临时order
export
function
getTempOrderByConsIds
(
params
){
return
request
({
url
:
'
/ecw/cons/getTempOrderByConsIds
'
,
method
:
'
get
'
,
params
})
}
// 获得集运包裹主分页
// 获得集运包裹主分页
export
function
getConsPage
(
query
)
{
export
function
getConsPage
(
query
)
{
return
request
({
return
request
({
...
...
src/views/ecw/cons/index.vue
View file @
63bc66f0
...
@@ -12,40 +12,48 @@
...
@@ -12,40 +12,48 @@
@
input=
"replaceSpace(noParam, 'value')"
@
input=
"replaceSpace(noParam, 'value')"
@
keyup.enter.native=
"handleQuery"
>
@
keyup.enter.native=
"handleQuery"
>
<template
slot=
"prepend"
>
<template
slot=
"prepend"
>
<dict-selector
:type=
"DICT_TYPE.ORDER_QUERY_NO_FIELD"
defaultable
v-model=
"noParam.key"
/>
<dict-selector
:type=
"DICT_TYPE.ORDER_QUERY_NO_FIELD"
defaultable
v-model=
"noParam.key"
/>
</
template
>
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发货人"
prop=
"customerNumber"
>
<el-form-item
label=
"发货人"
prop=
"customerNumber"
>
<el-input
v-model=
"queryParams.customerKey"
placeholder=
"请输入发货人手机号、客户编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.customerKey"
placeholder=
"请输入发货人手机号、客户编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"发货人名称"
prop=
"customerNumber"
>
<el-form-item
label=
"发货人名称"
prop=
"customerNumber"
>
<el-input
v-model=
"queryParams.customerName"
placeholder=
"请输入客户名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.customerName"
placeholder=
"请输入客户名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('集运仓')"
>
<el-form-item
:label=
"$t('集运仓')"
>
<el-select
v-model=
"queryParams.wareId"
:placeholder=
"$t('请选择仓库')"
filterable
>
<el-select
v-model=
"queryParams.wareId"
:placeholder=
"$t('请选择仓库')"
filterable
>
<el-option
v-for=
"warehouse in this.warehouseList"
:key=
"warehouse.id"
:label=
"$l(warehouse,'title')"
:value=
"warehouse.id"
></el-option>
<el-option
v-for=
"warehouse in this.warehouseList"
:key=
"warehouse.id"
:label=
"$l(warehouse,'title')"
:value=
"warehouse.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
>
<el-form-item
:label=
"$t('客户经理')"
>
<user-selector
manage
v-model=
"queryParams.salesmanIds"
multiple
clearable
@
change=
"handleQuery"
:prepend=
"{ id: 0, nickname: $t('未分配客户经理') }"
class=
"w-200"
/>
<user-selector
manage
v-model=
"queryParams.salesmanIds"
multiple
clearable
@
change=
"handleQuery"
:prepend=
"{ id: 0, nickname: $t('未分配客户经理') }"
class=
"w-200"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportId"
>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportId"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
class=
"w-200"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
class=
"w-200"
/>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('目的国')"
prop=
"consigneeCountryId"
>
<el-form-item
:label=
"$t('目的国')"
prop=
"consigneeCountryId"
>
<el-select
v-model=
"queryParams.consigneeCountryId"
:label=
"queryParams.consigneeCountryId"
:placeholder=
"$t('请选择目的国')"
clearable
@
change=
"handleQuery"
class=
"w-200"
>
<el-select
v-model=
"queryParams.consigneeCountryId"
:label=
"queryParams.consigneeCountryId"
<el-option
v-for=
"item in AddressProvince"
:key=
"item.guojia"
:label=
"item.guojiaName"
:value=
"item.guojia"
></el-option>
:placeholder=
"$t('请选择目的国')"
clearable
@
change=
"handleQuery"
class=
"w-200"
>
<el-option
v-for=
"item in AddressProvince"
:key=
"item.guojia"
:label=
"item.guojiaName"
:value=
"item.guojia"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('目的城市')"
prop=
"objectiveId"
>
<el-form-item
:label=
"$t('目的城市')"
prop=
"objectiveId"
>
<el-select
v-model=
"queryParams.consigneeCityId"
:placeholder=
"$t('请选择目的城市')"
style=
"width: 200px"
clearable
@
change=
"handleQuery"
class=
"w-200"
>
<el-select
v-model=
"queryParams.consigneeCityId"
:placeholder=
"$t('请选择目的城市')"
style=
"width: 200px"
clearable
@
change=
"handleQuery"
class=
"w-200"
>
<el-option
v-for=
"item in AddressCity"
:key=
"item.shi"
:label=
"item.shiName"
:value=
"item.shi"
></el-option>
<el-option
v-for=
"item in AddressCity"
:key=
"item.shi"
:label=
"item.shiName"
:value=
"item.shi"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelIdList"
>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelIdList"
>
<el-select
v-model=
"queryParams.shippingChannelIdList"
multiple
:placeholder=
"$t('请选择出货渠道')"
clearable
>
<el-select
v-model=
"queryParams.shippingChannelIdList"
multiple
:placeholder=
"$t('请选择出货渠道')"
clearable
>
<el-option
v-for=
"item in channelList"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
<el-option
v-for=
"item in channelList"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -74,13 +82,14 @@
...
@@ -74,13 +82,14 @@
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleBatchSignOff"
>
批量签收
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleBatchSignOff"
>
批量签收
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleBatchConsEdit"
>
批量更新货运信息
</el-button>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleBatchConsEdit"
>
批量更新货运信息
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
size=
"mini"
>
转运
</el-button>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleTransfer"
>
转运
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
size=
"mini"
>
批量申请费用
</el-button>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
size=
"mini"
>
批量申请费用
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -88,20 +97,21 @@
...
@@ -88,20 +97,21 @@
<!-- 列表 -->
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
fixed
></el-table-column>
<el-table-column
type=
"selection"
width=
"55"
fixed
></el-table-column>
<el-table-column
label=
"快递单号"
align=
"center"
prop=
"expressNo"
/>
<el-table-column
label=
"快递单号"
align=
"center"
prop=
"expressNo"
/>
<el-table-column
label=
"客户"
align=
"center"
>
<el-table-column
label=
"客户"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
customerName
}}
(
{{
scope
.
row
.
customerNumber
}}
)
{{
scope
.
row
.
customerName
}}
(
{{
scope
.
row
.
customerNumber
}}
)
</
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"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"scope.row.transportId"
/>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"scope.row.transportId"
/>
</
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"
>
<dict-tag
:type=
"DICT_TYPE.CONS_BUSINESS_NODE"
:value=
"scope.row.businessNode"
/>
<dict-tag
:type=
"DICT_TYPE.CONS_BUSINESS_NODE"
:value=
"scope.row.businessNode"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"最新跟进时间"
align=
"center"
>
<el-table-column
label=
"最新跟进时间"
align=
"center"
>
...
@@ -109,7 +119,7 @@
...
@@ -109,7 +119,7 @@
<span>
{{
parseTime
(
scope
.
row
.
trackingTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
trackingTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"sumQuantity"
/>
<el-table-column
label=
"箱数"
align=
"center"
prop=
"sumQuantity"
/>
<el-table-column
label=
"填单商品"
align=
"center"
>
<el-table-column
label=
"填单商品"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-html=
"getGoodsName(scope.row.consItemList)"
></span>
<span
v-html=
"getGoodsName(scope.row.consItemList)"
></span>
...
@@ -117,29 +127,29 @@
...
@@ -117,29 +127,29 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"验货数据"
align=
"center"
>
<el-table-column
label=
"验货数据"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
getInspectionInfo
(
scope
.
row
.
consItemList
,
scope
.
row
.
inspectStatus
)
}}
{{
getInspectionInfo
(
scope
.
row
.
consItemList
,
scope
.
row
.
inspectStatus
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"货值(RMB)"
align=
"center"
prop=
"worth"
/>
<el-table-column
label=
"货值(RMB)"
align=
"center"
prop=
"worth"
/>
<!-- <el-table-column label="预计到仓时间" align="center" prop="watEtime" width="180">-->
<!-- <el-table-column label="预计到仓时间" align="center" prop="watEtime" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.watEtime) }}</span>-->
<!-- <span>{{ parseTime(scope.row.watEtime) }}</span>-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table-column>-->
<el-table-column
label=
"签收时间"
align=
"center"
prop=
"signedTime"
width=
"180"
>
<el-table-column
label=
"签收时间"
align=
"center"
prop=
"signedTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
signedTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
signedTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"签收备注"
align=
"center"
prop=
"signedRemarks"
/>
<el-table-column
label=
"签收备注"
align=
"center"
prop=
"signedRemarks"
/>
<el-table-column
label=
"始发仓"
align=
"center"
>
<el-table-column
label=
"始发仓"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
isChinese
?
scope
.
row
.
startTitleZh
:
scope
.
row
.
startTitleEn
}}
{{
isChinese
?
scope
.
row
.
startTitleZh
:
scope
.
row
.
startTitleEn
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"目的仓"
align=
"center"
>
<el-table-column
label=
"目的仓"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
isChinese
?
scope
.
row
.
destTitleZh
:
scope
.
row
.
destTitleEn
}}
{{
isChinese
?
scope
.
row
.
destTitleZh
:
scope
.
row
.
destTitleEn
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -157,31 +167,31 @@
...
@@ -157,31 +167,31 @@
<el-table-column
:label=
"$t('验货')"
align=
"center"
>
<el-table-column
:label=
"$t('验货')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.needInspect==='0'"
>
<template
v-if=
"scope.row.needInspect==='0'"
>
{{
$t
(
'
未申请
'
)
}}
{{
$t
(
'
未申请
'
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<dict-tag
:type=
"DICT_TYPE.CONS_INSPECT_STATUS"
:value=
"scope.row.inspectStatus"
/>
<dict-tag
:type=
"DICT_TYPE.CONS_INSPECT_STATUS"
:value=
"scope.row.inspectStatus"
/>
</
template
>
</
template
>
</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"
>
<dict-tag
:type=
"DICT_TYPE.CONS_STATUS"
:value=
"scope.row.status"
/>
<dict-tag
:type=
"DICT_TYPE.CONS_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"关联订单号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"关联订单号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
:label=
"$t('订单状态')"
align=
"center"
>
<el-table-column
:label=
"$t('订单状态')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.orderStatus"
/>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.orderStatus"
/>
</
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"
>
<dict-tag
:type=
"DICT_TYPE.AUDIT_STATUS"
:value=
"scope.row.returnStatus"
/>
<dict-tag
:type=
"DICT_TYPE.AUDIT_STATUS"
:value=
"scope.row.returnStatus"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"包裹号"
align=
"center"
prop=
"consNum"
/>
<el-table-column
label=
"包裹号"
align=
"center"
prop=
"consNum"
/>
<el-table-column
label=
"包裹备注"
align=
"center"
prop=
"remarks"
/>
<el-table-column
label=
"包裹备注"
align=
"center"
prop=
"remarks"
/>
<el-table-column
label=
""
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
""
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
...
@@ -190,14 +200,23 @@
...
@@ -190,14 +200,23 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:cons:update']"
>
修改
</el-button>
v-hasPermi=
"['ecw:cons:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:cons:delete']"
>
删除
</el-button>
v-hasPermi=
"['ecw:cons:delete']"
>
删除
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"transmutation(scope.row)"
>
{{
$t
(
'
转异
'
)
}}
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"specialNeedsCons(scope.row)"
>
{{
$t
(
'
特需
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"transmutation(scope.row)"
>
{{
$t
(
'
转异
'
)
}}
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"specialNeedsConsLook(scope.row)"
>
{{
$t
(
'
特需查看
'
)
}}
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"feeApplication(scope.row)"
>
{{
$t
(
'
费用申请
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"specialNeedsCons(scope.row)"
>
{{
$t
(
'
特需
'
)
}}
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"consFollowup(scope.row)"
>
{{
$t
(
'
跟进
'
)
}}
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"specialNeedsConsLook(scope.row)"
>
{{
$t
(
'
特需查看
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"feeApplication(scope.row)"
>
{{
$t
(
'
费用申请
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"consFollowup(scope.row)"
>
{{
$t
(
'
跟进
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"exceptionHandling(scope.row)"
>
{{
$t
(
'
处理异常
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"exceptionHandling(scope.row)"
>
{{
$t
(
'
处理异常
'
)
}}
</el-button>
</
template
>
</
template
>
...
@@ -211,22 +230,22 @@
...
@@ -211,22 +230,22 @@
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
""
prop=
"customerId"
>
<el-form-item
label=
""
prop=
"customerId"
>
<el-input
v-model=
"form.customerId"
placeholder=
"请输入"
/>
<el-input
v-model=
"form.customerId"
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户编号"
prop=
"customerNumber"
>
<el-form-item
label=
"客户编号"
prop=
"customerNumber"
>
<el-input
v-model=
"form.customerNumber"
placeholder=
"请输入客户编号"
/>
<el-input
v-model=
"form.customerNumber"
placeholder=
"请输入客户编号"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"运输方式,来自字典的值"
prop=
"transportId"
>
<el-form-item
label=
"运输方式,来自字典的值"
prop=
"transportId"
>
<el-input
v-model=
"form.transportId"
placeholder=
"请输入运输方式,来自字典的值"
/>
<el-input
v-model=
"form.transportId"
placeholder=
"请输入运输方式,来自字典的值"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单ID,关联订单表"
prop=
"orderId"
>
<el-form-item
label=
"订单ID,关联订单表"
prop=
"orderId"
>
<el-input
v-model=
"form.orderId"
placeholder=
"请输入订单ID,关联订单表"
/>
<el-input
v-model=
"form.orderId"
placeholder=
"请输入订单ID,关联订单表"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"平台ID,关联平台表数据,为后面系统对接预留字段"
prop=
"platformId"
>
<el-form-item
label=
"平台ID,关联平台表数据,为后面系统对接预留字段"
prop=
"platformId"
>
<el-input
v-model=
"form.platformId"
placeholder=
"请输入平台ID,关联平台表数据,为后面系统对接预留字段"
/>
<el-input
v-model=
"form.platformId"
placeholder=
"请输入平台ID,关联平台表数据,为后面系统对接预留字段"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"平台订单号"
prop=
"platformOrderSn"
>
<el-form-item
label=
"平台订单号"
prop=
"platformOrderSn"
>
<el-input
v-model=
"form.platformOrderSn"
placeholder=
"请输入平台订单号"
/>
<el-input
v-model=
"form.platformOrderSn"
placeholder=
"请输入平台订单号"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"包裹状态,来自字典表,cons_status"
prop=
"status"
>
<el-form-item
label=
"包裹状态,来自字典表,cons_status"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio-group
v-model=
"form.status"
>
...
@@ -234,25 +253,26 @@
...
@@ -234,25 +253,26 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"快递公司ID,对应快递公司表"
prop=
"expressId"
>
<el-form-item
label=
"快递公司ID,对应快递公司表"
prop=
"expressId"
>
<el-input
v-model=
"form.expressId"
placeholder=
"请输入快递公司ID,对应快递公司表"
/>
<el-input
v-model=
"form.expressId"
placeholder=
"请输入快递公司ID,对应快递公司表"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"快递单号"
prop=
"expressNo"
>
<el-form-item
label=
"快递单号"
prop=
"expressNo"
>
<el-input
v-model=
"form.expressNo"
placeholder=
"请输入快递单号"
/>
<el-input
v-model=
"form.expressNo"
placeholder=
"请输入快递单号"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"仓库ID"
prop=
"wareId"
>
<el-form-item
label=
"仓库ID"
prop=
"wareId"
>
<el-input
v-model=
"form.wareId"
placeholder=
"请输入仓库ID"
/>
<el-input
v-model=
"form.wareId"
placeholder=
"请输入仓库ID"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"货值"
prop=
"worth"
>
<el-form-item
label=
"货值"
prop=
"worth"
>
<el-input
v-model=
"form.worth"
placeholder=
"请输入货值"
/>
<el-input
v-model=
"form.worth"
placeholder=
"请输入货值"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"货值单位,默认为3,人民币"
prop=
"worthCurrency"
>
<el-form-item
label=
"货值单位,默认为3,人民币"
prop=
"worthCurrency"
>
<el-input
v-model=
"form.worthCurrency"
placeholder=
"请输入货值单位,默认为3,人民币"
/>
<el-input
v-model=
"form.worthCurrency"
placeholder=
"请输入货值单位,默认为3,人民币"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"预计到仓时间"
prop=
"watEtime"
>
<el-form-item
label=
"预计到仓时间"
prop=
"watEtime"
>
<el-date-picker
clearable
v-model=
"form.watEtime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择预计到仓时间"
/>
<el-date-picker
clearable
v-model=
"form.watEtime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择预计到仓时间"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
prop=
"watTime"
>
<el-form-item
label=
""
prop=
"watTime"
>
<el-date-picker
clearable
v-model=
"form.watTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择"
/>
<el-date-picker
clearable
v-model=
"form.watTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否被签收,0未签收,1已签收"
prop=
"signed"
>
<el-form-item
label=
"是否被签收,0未签收,1已签收"
prop=
"signed"
>
<el-radio-group
v-model=
"form.signed"
>
<el-radio-group
v-model=
"form.signed"
>
...
@@ -260,19 +280,23 @@
...
@@ -260,19 +280,23 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
label=
"签收时间"
prop=
"signedTime"
>
<el-form-item
label=
"签收时间"
prop=
"signedTime"
>
<el-date-picker
clearable
v-model=
"form.signedTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择签收时间"
/>
<el-date-picker
clearable
v-model=
"form.signedTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择签收时间"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"签收备注"
prop=
"signedRemarks"
>
<el-form-item
label=
"签收备注"
prop=
"signedRemarks"
>
<el-input
v-model=
"form.signedRemarks"
placeholder=
"请输入签收备注"
/>
<el-input
v-model=
"form.signedRemarks"
placeholder=
"请输入签收备注"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"数量"
prop=
"sumQuantity"
>
<el-form-item
label=
"数量"
prop=
"sumQuantity"
>
<el-input
v-model=
"form.sumQuantity"
placeholder=
"请输入数量"
/>
<el-input
v-model=
"form.sumQuantity"
placeholder=
"请输入数量"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
prop=
"opSource"
>
<el-form-item
<el-input
v-model=
"form.opSource"
placeholder=
"请输入区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
/>
label=
"区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
prop=
"opSource"
>
<el-input
v-model=
"form.opSource"
placeholder=
"请输入区分包裹是由谁创建的,关联字典表 cons_op_source,可区分为后台创建、客户web端、客户app端、客户H5端、仓库创建及其他,默认为1 客户app端"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -281,12 +305,18 @@
...
@@ -281,12 +305,18 @@
</div>
</div>
</el-dialog>
</el-dialog>
<Transmutation
:showException.sync=
"showException"
:id=
"id"
@
determine=
"getList"
></Transmutation>
<Transmutation
:showException.sync=
"showException"
:id=
"id"
@
determine=
"getList"
></Transmutation>
<SpecialNeedsCons
:showSpecialNeedsCons.sync=
"showSpecialNeedsCons"
:currency=
"JSON.stringify(currencyList)"
:consId=
"id"
:consNum=
"consNum"
@
determine=
"getList"
></SpecialNeedsCons>
<SpecialNeedsCons
:showSpecialNeedsCons.sync=
"showSpecialNeedsCons"
:currency=
"JSON.stringify(currencyList)"
<SpecialNeedsConsLook
:showSpecialNeedsConsLook.sync=
"showSpecialNeedsConsLook"
:consNum=
"consNum"
:consId=
"id"
></SpecialNeedsConsLook>
:consId=
"id"
:consNum=
"consNum"
@
determine=
"getList"
></SpecialNeedsCons>
<fee-application-cons
v-if=
"feeApplicationBol"
:consId=
"id"
:currencys=
"JSON.stringify(currencyList)"
:dialog-visible.sync=
"feeApplicationBol "
@
refresh=
"getList"
></fee-application-cons>
<SpecialNeedsConsLook
:showSpecialNeedsConsLook.sync=
"showSpecialNeedsConsLook"
:consNum=
"consNum"
<ConsFollowupEdit
:showConsFollowupEdit.sync=
"showConsFollowupEdit"
:consId=
"id"
@
determine=
"getList"
></ConsFollowupEdit>
:consId=
"id"
></SpecialNeedsConsLook>
<batch-sign-off
:showConsBatchSignOff.sync=
"showConsBatchSignOff"
@
determine=
"getList"
:consIds=
"consIds"
></batch-sign-off>
<fee-application-cons
v-if=
"feeApplicationBol"
:consId=
"id"
:currencys=
"JSON.stringify(currencyList)"
<batch-cons-edit
:showConsBatchEdit.sync=
"showConsBatchEdit"
@
determine=
"getList"
:consIds=
"consIds"
></batch-cons-edit>
:dialog-visible.sync=
"feeApplicationBol "
@
refresh=
"getList"
></fee-application-cons>
<ConsFollowupEdit
:showConsFollowupEdit.sync=
"showConsFollowupEdit"
:consId=
"id"
@
determine=
"getList"
></ConsFollowupEdit>
<batch-sign-off
:showConsBatchSignOff.sync=
"showConsBatchSignOff"
@
determine=
"getList"
:consIds=
"consIds"
></batch-sign-off>
<batch-cons-edit
:showConsBatchEdit.sync=
"showConsBatchEdit"
@
determine=
"getList"
:consIds=
"consIds"
></batch-cons-edit>
</div>
</div>
</template>
</template>
...
@@ -295,12 +325,12 @@ import {createCons, deleteCons, exportConsExcel, getCons, getConsPage, updateCon
...
@@ -295,12 +325,12 @@ import {createCons, deleteCons, exportConsExcel, getCons, getConsPage, updateCon
import
Transmutation
from
"
@/views/ecw/cons/components/Transmutation.vue
"
import
Transmutation
from
"
@/views/ecw/cons/components/Transmutation.vue
"
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
UserSelector
from
"
@/components/UserSelector/index.vue
"
;
import
UserSelector
from
"
@/components/UserSelector/index.vue
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getRegionList
}
from
"
@/api/ecw/order
"
;
import
{
getRegionList
}
from
"
@/api/ecw/order
"
;
import
SpecialNeedsCons
from
"
@/views/ecw/cons/components/SpecialNeedsCons.vue
"
import
SpecialNeedsCons
from
"
@/views/ecw/cons/components/SpecialNeedsCons.vue
"
import
SpecialNeedsConsLook
from
"
@/views/ecw/cons/components/SpecialNeedsConsLook.vue
"
import
SpecialNeedsConsLook
from
"
@/views/ecw/cons/components/SpecialNeedsConsLook.vue
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
FeeApplicationCons
from
"
@/views/ecw/cons/components/FeeApplicationCons.vue
"
import
FeeApplicationCons
from
"
@/views/ecw/cons/components/FeeApplicationCons.vue
"
import
FeeApplication
from
"
@/views/ecw/order/feeApplication.vue
"
import
FeeApplication
from
"
@/views/ecw/order/feeApplication.vue
"
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
;
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
;
...
@@ -343,11 +373,12 @@ export default {
...
@@ -343,11 +373,12 @@ export default {
key
:
"
numberKey
"
,
key
:
"
numberKey
"
,
value
:
""
value
:
""
},
},
consIds
:[],
consIds
:
[],
consList
:
[],
dateRangeWatEtime
:
[],
dateRangeWatEtime
:
[],
warehouseList
:[],
warehouseList
:
[],
AddressProvince
:[],
AddressProvince
:
[],
AddressCity
:[],
AddressCity
:
[],
dateRangeWatTime
:
[],
dateRangeWatTime
:
[],
dateRangeSignedTime
:
[],
dateRangeSignedTime
:
[],
dateRangeCreateTime
:
[],
dateRangeCreateTime
:
[],
...
@@ -379,7 +410,7 @@ export default {
...
@@ -379,7 +410,7 @@ export default {
},
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
signed
:
[{
required
:
true
,
message
:
"
是否被签收,0未签收,1已签收不能为空
"
,
trigger
:
"
blur
"
}],
signed
:
[{
required
:
true
,
message
:
"
是否被签收,0未签收,1已签收不能为空
"
,
trigger
:
"
blur
"
}],
},
},
showException
:
false
,
showException
:
false
,
showSpecialNeedsCons
:
false
,
showSpecialNeedsCons
:
false
,
...
@@ -407,13 +438,13 @@ export default {
...
@@ -407,13 +438,13 @@ export default {
// 根据渠道id获取渠道名
// 根据渠道id获取渠道名
channelName
()
{
channelName
()
{
return
(
id
)
=>
{
return
(
id
)
=>
{
return
id
!==
null
&&
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
;
return
id
!==
null
&&
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
;
};
};
},
},
isChinese
()
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
},
},
combinedQueryParams
(){
combinedQueryParams
()
{
console
.
log
(
this
.
queryParams
)
console
.
log
(
this
.
queryParams
)
let
queryParams
=
{...
this
.
queryParams
}
let
queryParams
=
{...
this
.
queryParams
}
if
(
this
.
noParam
.
value
)
{
if
(
this
.
noParam
.
value
)
{
...
@@ -433,26 +464,27 @@ export default {
...
@@ -433,26 +464,27 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
handleSelectionChange
(
val
){
handleSelectionChange
(
val
)
{
this
.
consIds
=
val
.
map
((
i
)
=>
i
.
id
)
this
.
consIds
=
val
.
map
((
i
)
=>
i
.
id
)
this
.
consList
=
val
;
},
},
getChannelList
()
{
getChannelList
()
{
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
))
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
))
},
},
getAddressProvince
()
{
getAddressProvince
()
{
getRegionList
(
1
,
1
).
then
(({
data
})
=>
{
getRegionList
(
1
,
1
).
then
(({
data
})
=>
{
this
.
AddressProvince
=
data
this
.
AddressProvince
=
data
})
})
},
},
getAddressCity
()
{
getAddressCity
()
{
getRegionList
(
4
,
4
).
then
(({
data
})
=>
{
getRegionList
(
4
,
4
).
then
(({
data
})
=>
{
this
.
AddressCity
=
data
this
.
AddressCity
=
data
})
})
},
},
findByprovinceCode
()
{
findByprovinceCode
()
{
if
(
this
.
queryParams
.
consigneeCountryId
!=
null
&&
this
.
queryParams
.
consigneeCountryId
!=
""
)
{
if
(
this
.
queryParams
.
consigneeCountryId
!=
null
&&
this
.
queryParams
.
consigneeCountryId
!=
""
)
{
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList
(
2
,
this
.
queryParams
.
consigneeCountryId
).
then
(({
data
})
=>
{
getRegionList
(
2
,
this
.
queryParams
.
consigneeCountryId
).
then
(({
data
})
=>
{
this
.
AddressCity
=
data
this
.
AddressCity
=
data
})
})
}
}
...
@@ -461,22 +493,22 @@ export default {
...
@@ -461,22 +493,22 @@ export default {
replaceSpace
(
obj
,
field
)
{
replaceSpace
(
obj
,
field
)
{
obj
[
field
]
=
obj
[
field
].
replace
(
/
\s
+/g
,
""
)
obj
[
field
]
=
obj
[
field
].
replace
(
/
\s
+/g
,
""
)
},
},
getGoodsName
(
val
){
getGoodsName
(
val
)
{
if
(
!
val
||
val
.
length
===
0
){
if
(
!
val
||
val
.
length
===
0
)
{
return
null
return
null
}
else
{
}
else
{
return
val
.
map
((
item
,
index
)
=>
`
${
index
+
1
}
.
${
item
.
prodName
}
*
${
item
.
quantity
}
`
).
join
(
'
<br>
'
);
return
val
.
map
((
item
,
index
)
=>
`
${
index
+
1
}
.
${
item
.
prodName
}
*
${
item
.
quantity
}
`
).
join
(
'
<br>
'
);
}
}
},
},
getInspectionInfo
(
val
,
status
)
{
getInspectionInfo
(
val
,
status
)
{
if
(
!
status
&&
status
!==
2
)
{
if
(
!
status
&&
status
!==
2
)
{
return
null
return
null
}
}
let
inspectionNums
=
0
;
let
inspectionNums
=
0
;
let
inspectionUnit
;
let
inspectionUnit
;
let
inspectionQuantitys
=
0
;
let
inspectionQuantitys
=
0
;
let
inspectionVolumes
=
0
;
let
inspectionVolumes
=
0
;
let
inspectionWeights
=
0
;
let
inspectionWeights
=
0
;
val
.
forEach
(
item
=>
{
val
.
forEach
(
item
=>
{
inspectionUnit
=
item
.
inspectionUnit
;
inspectionUnit
=
item
.
inspectionUnit
;
inspectionNums
+=
item
.
inspectionNum
;
inspectionNums
+=
item
.
inspectionNum
;
...
@@ -484,13 +516,13 @@ export default {
...
@@ -484,13 +516,13 @@ export default {
inspectionVolumes
+=
item
.
inspectionVolume
;
inspectionVolumes
+=
item
.
inspectionVolume
;
inspectionWeights
+=
item
.
inspectionWeight
;
inspectionWeights
+=
item
.
inspectionWeight
;
});
});
return
`
${
inspectionQuantitys
}${
inspectionUnit
?
inspectionUnit
:
this
.
$t
(
'
箱
'
)}
${
inspectionVolumes
}
m³
${
inspectionWeights
}
kg
${
inspectionNums
}
件`
;
return
`
${
inspectionQuantitys
}${
inspectionUnit
?
inspectionUnit
:
this
.
$t
(
'
箱
'
)}
${
inspectionVolumes
}
m³
${
inspectionWeights
}
kg
${
inspectionNums
}
件`
;
},
},
/** 查询列表 */
/** 查询列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
// 处理查询参数
// 处理查询参数
let
params
=
{
...
this
.
combinedQueryParams
};
let
params
=
{
...
this
.
combinedQueryParams
};
console
.
log
(
params
)
console
.
log
(
params
)
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeWatEtime
,
'
watEtime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeWatEtime
,
'
watEtime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeWatTime
,
'
watTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeWatTime
,
'
watTime
'
);
...
@@ -551,24 +583,87 @@ export default {
...
@@ -551,24 +583,87 @@ export default {
this
.
resetForm
(
"
queryForm
"
);
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
this
.
handleQuery
();
},
},
handleEditMore
(){
handleEditMore
()
{
this
.
$router
.
push
(
"
/cons/cons/create-more
"
)
this
.
$router
.
push
(
"
/cons/cons/create-more
"
)
},
},
handleEdit
(){
handleEdit
()
{
this
.
$router
.
push
(
"
/cons/cons/create
"
)
this
.
$router
.
push
(
"
/cons/cons/create
"
)
},
},
handleBatchSignOff
(){
handleBatchSignOff
()
{
if
(
!
this
.
consIds
.
length
)
{
if
(
!
this
.
consIds
.
length
)
{
return
this
.
$message
.
error
(
this
.
$t
(
'
最少选择一个包裹
'
))
return
this
.
$message
.
error
(
this
.
$t
(
'
最少选择一个包裹
'
))
}
}
this
.
showConsBatchSignOff
=
true
;
this
.
showConsBatchSignOff
=
true
;
},
},
handleBatchConsEdit
(){
handleBatchConsEdit
()
{
if
(
!
this
.
consIds
.
length
){
if
(
!
this
.
consIds
.
length
)
{
return
this
.
$message
.
error
(
this
.
$t
(
'
最少选择一个包裹
'
))
}
this
.
showConsBatchEdit
=
true
;
},
handleTransfer
()
{
if
(
!
this
.
consIds
.
length
)
{
return
this
.
$message
.
error
(
this
.
$t
(
'
最少选择一个包裹
'
))
return
this
.
$message
.
error
(
this
.
$t
(
'
最少选择一个包裹
'
))
}
}
this
.
showConsBatchEdit
=
true
;
// 2. 防御空数组
if
(
!
this
.
consList
?.
length
)
return
// 新增客户ID非空校验(在所有校验前优先检查)
const
hasEmptyCustomer
=
this
.
consList
.
some
(
item
=>
!
item
.
customerId
)
if
(
hasEmptyCustomer
)
{
return
this
.
$message
.
error
(
this
.
$t
(
'
客户不能为空
'
))
}
// 3. 定义需要校验的字段及中文映射
const
VALIDATION_FIELDS
=
[
'
customerId
'
,
'
transportId
'
,
'
departureId
'
,
'
consigneeCountryId
'
,
'
consigneeCityId
'
,
'
warehouseLineId
'
,
'
channelId
'
]
const
FIELD_NAMES
=
{
customerId
:
this
.
$t
(
'
客户
'
),
transportId
:
this
.
$t
(
'
运输方式
'
),
departureId
:
this
.
$t
(
'
发货地
'
),
consigneeCountryId
:
this
.
$t
(
'
收件国家
'
),
consigneeCityId
:
this
.
$t
(
'
收件城市
'
),
warehouseLineId
:
this
.
$t
(
'
仓库线路
'
),
channelId
:
this
.
$t
(
'
渠道
'
)
}
// 4. 动态基准值校验逻辑
for
(
const
field
of
VALIDATION_FIELDS
)
{
// 4.1 动态获取第一个非空基准值
let
baseValue
=
null
for
(
const
item
of
this
.
consList
)
{
if
(
item
[
field
]
!=
null
)
{
baseValue
=
item
[
field
]
break
}
}
// 4.2 全空字段跳过检查
if
(
baseValue
===
null
)
continue
// 4.3 检查所有非空值是否一致
const
inconsistentItem
=
this
.
consList
.
find
(
item
=>
item
[
field
]
!=
null
&&
item
[
field
]
!==
baseValue
)
if
(
inconsistentItem
)
{
return
this
.
$message
.
error
(
this
.
$t
(
'
所有包裹的 {field} 必须一致
'
,
{
field
:
FIELD_NAMES
[
field
]
})
)
}
}
this
.
$router
.
push
({
path
:
"
/order/create
"
,
query
:
{
consIds
:
this
.
consIds
.
join
(
"
,
"
),
}
});
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
...
@@ -612,12 +707,13 @@ export default {
...
@@ -612,12 +707,13 @@ export default {
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
id
=
row
.
id
;
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除集运包裹主编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'
是否确认删除集运包裹主编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteCons
(
id
);
return
deleteCons
(
id
);
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
();
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
@@ -631,12 +727,13 @@ export default {
...
@@ -631,12 +727,13 @@ export default {
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有集运包裹主数据项?
'
).
then
(()
=>
{
this
.
$modal
.
confirm
(
'
是否确认导出所有集运包裹主数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportConsExcel
(
params
);
return
exportConsExcel
(
params
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
},
//转异
//转异
transmutation
(
row
)
{
transmutation
(
row
)
{
...
...
src/views/ecw/order/edit.vue
View file @
63bc66f0
...
@@ -793,6 +793,7 @@ import {debounce} from "@/utils";
...
@@ -793,6 +793,7 @@ 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
'
import
Template
from
'
@/views/cms/template/index.vue
'
import
{
checkBillOfLadingService
}
from
"
@/api/ecw/box
"
;
import
{
checkBillOfLadingService
}
from
"
@/api/ecw/box
"
;
import
{
getTempOrderByConsIds
}
from
"
@/api/ecw/cons
"
;
// 缓存默认的表单数据
// 缓存默认的表单数据
let
makeDefaultFormData
=
()
=>
{
let
makeDefaultFormData
=
()
=>
{
...
@@ -853,6 +854,7 @@ export default {
...
@@ -853,6 +854,7 @@ export default {
routerList
:
[],
routerList
:
[],
tradeCityList
:
[],
tradeCityList
:
[],
treeList
:
[],
treeList
:
[],
consIds
:[],
consignorContact
:
{},
// 发货联系人
consignorContact
:
{},
// 发货联系人
consigneeContact
:
{},
// 收货联系人
consigneeContact
:
{},
// 收货联系人
/* consignee: null,
/* consignee: null,
...
@@ -1052,6 +1054,10 @@ export default {
...
@@ -1052,6 +1054,10 @@ export default {
editMode
()
{
editMode
()
{
return
this
.
$route
.
path
.
indexOf
(
'
create
'
)
==
-
1
return
this
.
$route
.
path
.
indexOf
(
'
create
'
)
==
-
1
},
},
// 是否包裹转运
consMode
()
{
return
this
.
$route
.
query
.
hasOwnProperty
(
'
consIds
'
)
},
// 是否可以编辑商品基本信息(货值除外)
// 是否可以编辑商品基本信息(货值除外)
productEditable
()
{
productEditable
()
{
// 非编辑模式 或者 未完成入仓
// 非编辑模式 或者 未完成入仓
...
@@ -1350,8 +1356,115 @@ export default {
...
@@ -1350,8 +1356,115 @@ export default {
this
.
initing
=
false
this
.
initing
=
false
})
})
}
}
if
(
this
.
$route
.
query
.
hasOwnProperty
(
'
consIds
'
)){
console
.
log
(
"
有没有包裹
"
)
this
.
getTempOrderByConsIds
()
}
},
},
methods
:
{
methods
:
{
async
getTempOrderByConsIds
(){
//把传过来的consIds 2,3,4转成数组
this
.
consIds
=
this
.
$route
.
query
.
consIds
.
split
(
'
,
'
)
getTempOrderByConsIds
({
ids
:
this
.
consIds
.
join
(
'
,
'
)}).
then
(
res
=>
{
this
.
form
=
Object
.
assign
({},
{...
res
.
data
},
{
orderItemVOList
:
[]})
this
.
getOfferData
()
this
.
getTradeCity
()
this
.
getOpenedRouterList
()
console
.
log
(
"
未找到选择的路线111111
"
,
this
.
routerList
)
this
.
selectedRouter
=
this
.
routerList
.
find
(
item
=>
item
.
id
===
this
.
form
.
lineId
)
if
(
this
.
selectedRouter
)
{
this
.
form
.
destCountryId
=
this
.
selectedRouter
.
destCountryId
}
else
console
.
log
(
"
未找到选择的路线
"
,
this
.
routerList
,
this
.
selectedRouter
)
console
.
log
(
"
国家ID
"
,
this
.
form
.
destCountryId
)
console
.
log
(
"
res
"
,
res
)
// 是否有收货人
this
.
hasConsignee
=
!!
res
.
data
.
consigneeVO
// 每次编辑订单详情需要实时获取发货人当前信息
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
)
this
.
$set
(
this
.
form
,
'
consignorCountryCode
'
,
res
.
data
.
consignorVO
.
countryCode
.
replace
(
'
+
'
,
''
))
this
.
$set
(
this
.
form
,
'
consignorEmail
'
,
res
.
data
.
consignorVO
.
email
)
this
.
$set
(
this
.
form
,
'
consignorId
'
,
res
.
data
.
consignorVO
.
customerId
)
this
.
$set
(
this
.
form
,
'
consignorName
'
,
res
.
data
.
consignorVO
.
name
)
this
.
$set
(
this
.
form
,
'
consignorNameEn
'
,
res
.
data
.
consignorVO
.
nameEn
)
this
.
$set
(
this
.
form
,
'
consignorPhone
'
,
res
.
data
.
consignorVO
.
phone
)
this
.
getCustomer
(
res
.
data
.
consignorVO
.
customerId
)
}
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
)
this
.
$set
(
this
.
form
,
'
consigneeCountryCode
'
,
res
.
data
.
consigneeVO
.
countryCode
.
replace
(
'
+
'
,
''
))
this
.
$set
(
this
.
form
,
'
consigneeEmail
'
,
res
.
data
.
consigneeVO
.
email
)
this
.
$set
(
this
.
form
,
'
consigneeId
'
,
res
.
data
.
consigneeVO
.
customerId
)
this
.
$set
(
this
.
form
,
'
consigneeName
'
,
res
.
data
.
consigneeVO
.
name
)
this
.
$set
(
this
.
form
,
'
consigneeNameEn
'
,
res
.
data
.
consigneeVO
.
nameEn
)
this
.
$set
(
this
.
form
,
'
consigneePhone
'
,
res
.
data
.
consigneeVO
.
phone
)
}
// res.data.hasConsignee 订单冗余的发货人是否允许无收货人
// res.data.noConsignee 当前订单发货人是否允许无收货
// 如果已完成入仓,则需要监听必填内容,发生更改后需要填写审批表单
this
.
$nextTick
(()
=>
{
console
.
log
(
'
nextTick 订单渲染完成
'
)
res
.
data
.
orderItemVOList
.
forEach
(
item
=>
{
let
newItem
=
{}
if
(
this
.
$route
.
query
.
copy
&&
this
.
$route
.
query
.
copy
==
1
)
{
newItem
.
link
=
item
.
link
newItem
.
prodId
=
item
.
prodId
newItem
.
prodTitleEn
=
item
.
prodTitleEn
newItem
.
prodTitleZh
=
item
.
prodTitleZh
newItem
.
prodAttrIds
=
item
.
prodAttrIds
newItem
.
prodType
=
item
.
prodType
newItem
.
volume
=
item
.
volume
newItem
.
weight
=
item
.
weight
newItem
.
quantity
=
item
.
quantity
newItem
.
num
=
item
.
num
newItem
.
worth
=
item
.
worth
newItem
.
boxGauge
=
item
.
boxGauge
newItem
.
brandType
=
item
.
brandType
}
else
{
newItem
=
item
}
newItem
.
prodAttrArr
=
newItem
.
prodAttrIds
?.
split
(
'
,
'
).
filter
(
item
=>
item
!=
''
).
map
(
attrId
=>
+
attrId
)
||
[]
this
.
form
.
orderItemVOList
.
push
({...
newItem
})
})
// 已入仓后,必填字段修改则需要显示审批流
if
(
this
.
updateWorth
==
1
){
this
.
showWorkFlow
=
false
}
else
if
(
this
.
inWarehouse
)
{
Object
.
keys
(
this
.
rules
).
forEach
(
field
=>
{
console
.
log
(
"
watch
"
,
field
)
this
.
$watch
(
`form.
${
field
}
`
,
()
=>
{
this
.
showWorkFlow
=
true
})
})
}
// 在初始化结束后transportId还会发生一次变化导致目的港清关被重置,所以需要延迟一下。暂不清楚原因
setTimeout
(()
=>
{
console
.
log
(
'
transportId
'
,
this
.
form
.
transportId
)
console
.
log
(
'
portDestCustomsClear
'
,
this
.
form
.
portDestCustomsClear
,
res
.
data
.
portDestCustomsClear
)
if
(
res
.
data
.
portDestCustomsClear
)
{
this
.
$set
(
this
.
form
,
'
portDestCustomsClear
'
,
res
.
data
.
portDestCustomsClear
)
}
if
(
res
.
data
.
deliveryWay
)
{
this
.
$set
(
this
.
form
,
'
deliveryWay
'
,
res
.
data
.
deliveryWay
)
}
this
.
$nextTick
(()
=>
{
this
.
initing
=
false
console
.
log
(
"
初始化完成 initing
"
,
this
.
initing
)
})
},
100
)
})
})
},
async
getTradeCity
(
a
)
{
async
getTradeCity
(
a
)
{
let
query
=
{}
let
query
=
{}
if
(
this
.
form
.
channelId
)
{
if
(
this
.
form
.
channelId
)
{
...
...
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