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
b503e130
Commit
b503e130
authored
Jun 17, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-13-5提交
parent
8e1184b4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2858 additions
and
1114 deletions
+2858
-1114
follow.js
src/api/ecw/follow.js
+63
-0
index.vue
src/views/ecw/customer/index.vue
+1
-4
create.vue
src/views/ecw/follow/create.vue
+159
-0
index.vue
src/views/ecw/follow/index.vue
+500
-0
ChooseOrderProducts.vue
...ews/ecw/order/stocking/components/ChooseOrderProducts.vue
+123
-83
index.vue
src/views/ecw/order/stocking/index.vue
+527
-344
stockingList.vue
src/views/ecw/order/stockingList.vue
+440
-178
edit.vue
src/views/ecw/productPrice/edit.vue
+81
-74
index.vue
src/views/ecw/productPrice/index.vue
+964
-431
No files found.
src/api/ecw/follow.js
0 → 100644
View file @
b503e130
import
request
from
'
@/utils/request
'
// 创建跟进
export
function
createCustomerFollow
(
data
)
{
return
request
({
url
:
'
/ecw/customer-follow/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新跟进
export
function
updateCustomerFollow
(
data
)
{
return
request
({
url
:
'
/ecw/customer-follow/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除跟进
export
function
deleteCustomerFollow
(
id
)
{
return
request
({
url
:
'
/ecw/customer-follow/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得跟进
export
function
getCustomerFollow
(
id
)
{
return
request
({
url
:
'
/ecw/customer-follow/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得跟进分页
export
function
getCustomerFollowPage
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出跟进 Excel
export
function
exportCustomerFollowExcel
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
//
export
function
getFollowPage
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/followPage
'
,
method
:
'
get
'
,
params
:
query
})
}
\ No newline at end of file
src/views/ecw/customer/index.vue
View file @
b503e130
...
...
@@ -29,7 +29,6 @@
<el-form-item
:label=
"$t('客户等级')"
prop=
"level"
>
<el-select
multiple
clearable
v-model=
"queryParams.level"
:placeholder=
"$t('请选择客户等级')"
clearable
...
...
@@ -66,7 +65,6 @@
clearable
v-model=
"queryParams.customerService"
:placeholder=
"$t('请选择客户经理')"
clearable
size=
"small"
@
change=
"handleQuery"
>
...
...
@@ -117,7 +115,6 @@
clearable
v-model=
"queryParams.status"
:placeholder=
"$t('请选择客户状态')"
clearable
size=
"small"
@
change=
"handleQuery"
>
...
...
src/views/ecw/follow/create.vue
0 → 100644
View file @
b503e130
<
template
>
<div
class=
"app-container"
>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
报表跟进
'
)
}}
</div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
label-position=
"left"
>
<el-form-item
:label=
"$t('编号')"
prop=
"followNo"
>
<el-input
type=
"text"
v-model=
"form.followNo"
:placeholder=
"$t('请输入编号')"
/>
</el-form-item>
<el-form-item
:label=
"$t('类型')"
prop=
"type"
style=
"width: 46%;display: inline-block;margin-left:8%"
>
<!--
<el-radio
v-model=
"form.type"
label=
"2"
>
{{
$t
(
'
商务洽谈
'
)
}}
</el-radio>
-->
<dict-selector
ref=
'dictMethod'
v-model=
"form.followMethod"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('客户编号')"
prop=
"followNo"
>
<el-input
type=
"text"
v-model=
"form.followNo"
/>
</el-form-item>
<el-form-item
:label=
"$t('报价单号')"
prop=
"number"
style=
"width: 46%;display: inline-block;"
>
<label>
{{
form
.
number
}}
</label>
</el-form-item>
<el-form-item
:label=
"$t('跟进时间')"
prop=
"followUpTime"
style=
"width: 46%;display: inline-block"
>
<el-date-picker
clearable
v-model=
"form.followUpTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
:placeholder=
"$t('选择跟进时间')"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
prop=
"followUpSalesmanId"
style=
"width: 46%;display: inline-block;;margin-left:8%"
>
<el-select
v-model=
"form.followUpSalesmanId"
:placeholder=
"$t('请选择跟进业务员')"
clearable
>
<el-option
v-for=
"item in creatorData"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('联系人')"
prop=
"contacts"
style=
"width: 46%;display: inline-block"
>
<el-select
v-model=
"form.contacts"
:placeholder=
"$t('请选择联系人')"
clearable
>
<el-option
v-for=
"item in contactsData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('跟进方式')"
prop=
"followUpMethod"
style=
"width: 46%;display: inline-block;margin-left:8%"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
:placeholder=
"$t('请选择跟进方式')"
v-model=
"form.followUpMethod"
form-type=
"select"
:clearable=
"true"
/>
</el-form-item>
<el-form-item
:label=
"$t('目的')"
prop=
"customerFeedback"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.customerFeedback"
maxlength=
"500"
:placeholder=
"$t('请输入客户反馈')"
/>
</el-form-item>
<el-form-item
:label=
"$t('情况')"
prop=
"processingResults"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.processingResults"
maxlength=
"500"
:placeholder=
"$t('请输入处理结果')"
/>
</el-form-item>
</el-form>
</el-card>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{
$t
(
'
确定
'
)
}}
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
createOfferLog
}
from
"
@/api/ecw/offerLog
"
import
{
userList
}
from
"
@/api/system/user
"
import
{
getCustomerContactsListByCustomer
}
from
"
@/api/ecw/customerContacts
"
import
{
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getOffer
}
from
'
@/api/ecw/offer
'
import
{
getCustomerContactsSelect
}
from
'
@/api/ecw/customerContacts
'
export
default
{
name
:
"
OfferLog
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
open
:
false
,
contactsData
:[],
creatorData
:[],
// 表单参数
form
:
{
type
:
'
2
'
,
offerId
:
0
,
number
:
0
,
},
relationId
:
0
,
// 表单校验
rules
:
{
type
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择跟进类型
"
),
trigger
:
"
change
"
}],
followUpTime
:
[{
required
:
true
,
message
:
this
.
$t
(
"
跟进时间不能为空
"
),
trigger
:
"
blur
"
}],
followUpSalesmanId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户经理不能为空
"
),
trigger
:
"
change
"
}],
contacts
:
[{
required
:
true
,
message
:
this
.
$t
(
"
联系人不能为空
"
),
trigger
:
"
blur
"
}],
followUpMethod
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请选择跟进方式
"
),
trigger
:
"
change
"
}],
customerFeedback
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户反馈不能为空
"
),
trigger
:
"
blur
"
}],
processingResults
:
[{
required
:
true
,
message
:
this
.
$t
(
"
处理结果不能为空
"
),
trigger
:
"
blur
"
}],
},
list
:[]
};
},
created
()
{
if
(
this
.
$route
.
query
.
offerId
){
this
.
form
.
offerId
=
this
.
$route
.
query
.
offerId
this
.
getList
();
}
if
(
this
.
$route
.
query
.
number
){
this
.
form
.
number
=
this
.
$route
.
query
.
number
}
userList
(
'
customer service
'
).
then
(
res
=>
this
.
creatorData
=
res
.
data
)
},
methods
:
{
getList
()
{
let
that
=
this
// 执行查询
getOffer
(
that
.
form
.
offerId
).
then
(
response
=>
{
that
.
list
=
response
.
data
;
that
.
getContactsData
()
})
},
getContactsData
(){
getCustomerContactsSelect
({
ids
:
[
this
.
list
.
consigneeId
,
this
.
list
.
consignorId
].
join
(
'
,
'
)}).
then
((
res
)
=>
{
if
(
res
.
data
.
list
.
length
>
0
){
this
.
contactsData
.
push
({
name
:
res
.
data
.
list
[
0
].
contactsName
+
'
(
'
+
this
.
$t
(
'
发货人
'
)
+
'
)
'
,
id
:
res
.
data
.
list
[
0
].
customerContactsId
})
this
.
contactsData
.
push
({
name
:
res
.
data
.
list
[
1
].
contactsName
+
'
(
'
+
this
.
$t
(
'
收货人
'
)
+
'
)
'
,
id
:
res
.
data
.
list
[
1
].
customerContactsId
})
}
})
// getCustomerContactsListByCustomer({customerId:this.relationId}).then(response => {
// this.contactsData = response.data
// })
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 添加的提交
this
.
form
.
type
=
parseInt
(
this
.
form
.
type
)
this
.
form
.
followUpMethod
=
parseInt
(
this
.
form
.
followUpMethod
)
createOfferLog
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
$store
.
dispatch
(
'
tagsView/delCurrentView
'
)
});
});
},
}
};
</
script
>
<
style
scoped
>
.dialog-footer
{
padding
:
40px
;
}
</
style
>
src/views/ecw/follow/index.vue
0 → 100644
View file @
b503e130
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"编号"
prop=
"followNo"
>
<el-input
v-model=
"queryParams.followNo"
placeholder=
"请输入编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"跟进类型"
prop=
"followType"
>
<!--
<el-select
v-model=
"queryParams.followType"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_TYPE"
placeholder=
"请选择跟进类型"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
-->
<dict-selector
clearable
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_TYPE"
v-model=
"queryParams.followType"
@
change=
"handleQuery"
></dict-selector>
</el-form-item>
<el-form-item
label=
"跟进时间"
>
<el-date-picker
v-model=
"dateRangeFollowTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"contactName"
>
<el-input
v-model=
"queryParams.contactName"
placeholder=
"请输入联系人"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"跟进方式"
prop=
"followMethod"
>
<!--
<el-input
v-model=
"queryParams.followMethod"
placeholder=
"请输入跟进方式"
clearable
@
keyup.enter.native=
"handleQuery"
/>
-->
<dict-selector
clearable
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
v-model=
"queryParams.followMethod"
@
change=
"handleQuery"
></dict-selector>
</el-form-item>
<el-form-item
label=
"客户经理"
prop=
"followUserId"
>
<!--
<el-input
v-model=
"queryParams.followUserId"
placeholder=
"请输入跟进业务员"
clearable
@
keyup.enter.native=
"handleQuery"
/>
-->
<el-select
v-model=
"queryParams.followUserId"
:placeholder=
"$t('请选择客户经理')"
clearable
size=
"small"
@
change=
"handleQuery"
>
<el-option
v-for=
"dict in customerServiceList"
:key=
"dict.id"
:label=
"dict.nickname"
:value=
"dict.id"
/>
</el-select>
</el-form-item>
<!--
<el-form-item
label=
"客户反馈"
prop=
"feedback"
>
<el-input
v-model=
"queryParams.feedback"
placeholder=
"请输入客户反馈"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"处理结果"
prop=
"result"
>
<el-input
v-model=
"queryParams.result"
placeholder=
"请输入处理结果"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<!--
<el-form-item
label=
"管理员id"
prop=
"adminId"
>
<el-input
v-model=
"queryParams.adminId"
placeholder=
"请输入管理员id"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:customer-follow:create']"
>
新增
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"updateStatus"
v-hasPermi=
"['ecw:customer-follow:updateStatus']"
>
修改状态
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:customer-follow:export']"
>
导出
</el-button
>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<!--
<el-table-column
label=
""
align=
"center"
prop=
"id"
/>
-->
<el-table-column
label=
"编号"
align=
"center"
prop=
"followNo"
/>
<el-table-column
prop=
"followType"
:label=
"$t('跟进类型')"
:formatter=
"
(row, column, cellValue) =>
getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_TYPE, cellValue)
"
>
</el-table-column>
<el-table-column
label=
"报价单"
align=
"center"
prop=
"bizNo"
/>
<el-table-column
label=
"时间"
align=
"center"
prop=
"followTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
followTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"客户编号"
align=
"center"
prop=
"number"
/>
<el-table-column
label=
"联系人"
align=
"center"
prop=
"contactName"
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"客户经理"
align=
"center"
prop=
"followUserName"
/>
<el-table-column
prop=
"followMethod"
:label=
"$t('方式')"
:formatter=
"
(row, column, cellValue) =>
getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_METHOD, cellValue)
"
>
</el-table-column>
<el-table-column
label=
"目的"
align=
"center"
prop=
"customerFeedback"
/>
<el-table-column
label=
"结果"
align=
"center"
prop=
"followResult"
/>
<el-table-column
label=
"跟进情况"
align=
"center"
prop=
"result"
/>
<el-table-column
label=
"下次跟进时间"
align=
"center"
prop=
"nextFollowTime"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
nextFollowTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"跟进计划"
align=
"center"
prop=
"nextPlan"
/>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"creatorName"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"最后更新人"
align=
"center"
prop=
"updaterName"
/>
<el-table-column
label=
"最后更新时间"
align=
"center"
prop=
"updateTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:customer-follow:update']"
>
修改
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:customer-follow:delete']"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<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-item
label=
"业务ID"
prop=
"bizId"
>
<el-input
v-model=
"form.bizId"
placeholder=
"请输入业务ID"
/>
</el-form-item>
<el-form-item
label=
"跟进类型"
prop=
"followType"
>
<!-- <el-select v-model="form.followType" placeholder="请选择跟进类型">
<el-option label="请选择字典生成" value="" />
</el-select> -->
<dict-selector
ref=
"dictMethod"
v-model=
"form.followMethod"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
></dict-selector>
</el-form-item>
<el-form-item
label=
"跟进时间"
prop=
"followTime"
>
<el-date-picker
clearable
v-model=
"form.followTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择跟进时间"
/>
</el-form-item>
<el-form-item
label=
"联系人"
prop=
"contactName"
>
<el-input
v-model=
"form.contactName"
placeholder=
"请输入联系人"
/>
</el-form-item>
<el-form-item
label=
"跟进方式"
prop=
"followMethod"
>
<el-input
v-model=
"form.followMethod"
placeholder=
"请输入跟进方式"
/>
</el-form-item>
<el-form-item
label=
"跟进业务员"
prop=
"followUserId"
>
<el-input
v-model=
"form.followUserId"
placeholder=
"请输入跟进业务员"
/>
</el-form-item>
<el-form-item
label=
"客户反馈"
prop=
"feedback"
>
<el-input
v-model=
"form.feedback"
placeholder=
"请输入客户反馈"
/>
</el-form-item>
<el-form-item
label=
"处理结果"
prop=
"result"
>
<el-input
v-model=
"form.result"
placeholder=
"请输入处理结果"
/>
</el-form-item>
<el-form-item
label=
"管理员id"
prop=
"adminId"
>
<el-input
v-model=
"form.adminId"
placeholder=
"请输入管理员id"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createCustomerFollow
,
updateCustomerFollow
,
deleteCustomerFollow
,
getCustomerFollow
,
getCustomerFollowPage
,
exportCustomerFollowExcel
,
getFollowPage
,
}
from
"
@/api/ecw/follow
"
;
import
{
listServiceUser
}
from
"
@/api/system/user
"
;
export
default
{
name
:
"
CustomerFollow
"
,
components
:
{},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 跟进列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeFollowTime
:
[],
dateRangeCreateTime
:
[],
customerServiceList
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
bizId
:
null
,
followType
:
null
,
contactName
:
null
,
followMethod
:
null
,
followUserId
:
null
,
feedback
:
null
,
result
:
null
,
adminId
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
bizId
:
[{
required
:
true
,
message
:
"
业务ID不能为空
"
,
trigger
:
"
blur
"
}],
},
};
},
created
()
{
this
.
getList
();
listServiceUser
().
then
((
r
)
=>
{
this
.
customerServiceList
=
r
.
data
;
});
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{
...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeFollowTime
,
"
followTime
"
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
);
// 执行查询
getFollowPage
(
params
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
bizId
:
undefined
,
followType
:
undefined
,
followTime
:
undefined
,
contactName
:
undefined
,
followMethod
:
undefined
,
followUserId
:
undefined
,
feedback
:
undefined
,
result
:
undefined
,
adminId
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeFollowTime
=
[];
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加跟进
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getCustomerFollow
(
id
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改跟进
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateCustomerFollow
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createCustomerFollow
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除跟进编号为"
'
+
id
+
'
"的数据项?
'
)
.
then
(
function
()
{
return
deleteCustomerFollow
(
id
);
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{
...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeFollowTime
,
"
followTime
"
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
);
// 执行导出
this
.
$modal
.
confirm
(
"
是否确认导出所有跟进数据项?
"
)
.
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportCustomerFollowExcel
(
params
);
})
.
then
((
response
)
=>
{
this
.
$download
.
excel
(
response
,
"
${table.classComment}.xls
"
);
this
.
exportLoading
=
false
;
})
.
catch
(()
=>
{});
},
},
};
</
script
>
src/views/ecw/order/stocking/components/ChooseOrderProducts.vue
View file @
b503e130
...
...
@@ -5,168 +5,208 @@
append-to-body
width=
"90vw"
>
<el-table
ref=
"multipleTable"
:data=
"flatList"
@
selection-change=
"handleSelectionChange"
:span-method=
"objectSpanMethod"
class=
"table"
>
<el-table
ref=
"multipleTable"
:data=
"flatList"
@
selection-change=
"handleSelectionChange"
:span-method=
"objectSpanMethod"
class=
"table"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
:label=
"$t('品名')"
prop=
"name"
>
<template
#default
="
{
row}">
{{
$l
(
row
,
"
prodName
"
)
}}
</
template
>
<template
#default
="
{
row }">
{{
$l
(
row
,
"
prodName
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('品牌')"
prop=
"brand"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
brandName
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
brandName
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('材质')"
prop=
"material"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
materialLabel
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
materialLabel
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品特性')"
prop=
"attr"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
prodAttrNames
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
prodAttrNames
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('用途')"
prop=
"unit"
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
usageNames
"
)
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
row
,
"
usageNames
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('总数量')"
prop=
"quantityAll"
></el-table-column>
<el-table-column
:label=
"$t('总箱数')"
prop=
"cartonsNum"
></el-table-column>
<el-table-column
:label=
"$t('总数量')"
prop=
"quantityAll"
></el-table-column>
<el-table-column
:label=
"$t('总箱数')"
prop=
"cartonsNum"
></el-table-column>
<el-table-column
:label=
"$t('包装类型')"
prop=
"specificationType"
>
<
template
#default
="{
row
}"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
></dict-tag>
<
template
#default
="{
row
}"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('规格')"
prop=
"boxGauge"
></el-table-column>
<el-table-column
:label=
"$t('总重量')"
prop=
"weight"
></el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('快递单号')"
prop=
"expressNo"
></el-table-column>
<el-table-column
:label=
"$t('影像')"
prop=
"quantityAll"
>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"curPictrues = row.pictureUrls"
>
{{
$t
(
'
查看影像
'
)
}}
</el-button>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"curPictrues = row.pictureUrls"
>
{{
$t
(
"
查看影像
"
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"handleClose"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{
$t("确定")
}}
</el-button>
<el-button
@
click=
"handleClose"
>
{{ $t("取消") }}
</el-button>
</div>
<media-dialog
v-if=
"curPictrues"
:value=
"curPictrues"
@
close=
"curPictrues=null"
></media-dialog>
<media-dialog
v-if=
"curPictrues"
:value=
"curPictrues"
@
close=
"curPictrues = null"
></media-dialog>
</el-dialog>
</template>
<
script
>
import
{
getOrderItemCommonAttr
}
from
"
@/api/ecw/order
"
import
{
getOrderItemCommonAttr
}
from
"
@/api/ecw/order
"
;
import
MediaDialog
from
"
@/views/ecw/order/stocking/components/MediaDialog.vue
"
;
export
default
{
components
:
{
MediaDialog
},
components
:
{
MediaDialog
},
props
:
{
orderId
:
{
type
:
Number
,
default
:
undefined
default
:
undefined
,
},
warehouseInId
:
Number
warehouseInId
:
Number
,
},
data
(){
data
()
{
return
{
visible
:
true
,
// 备选的商品明细
orderItemDetails
:
[],
multipleSelection
:[],
curPictrues
:
null
}
multipleSelection
:
[],
curPictrues
:
null
,
}
;
},
watch
:{
visible
(
val
){
watch
:
{
visible
(
val
)
{
if
(
!
val
)
{
this
.
$emit
(
'
close
'
)
this
.
$emit
(
"
close
"
);
}
},
},
computed
:{
flatList
(){
let
arr
=
[]
this
.
orderItemDetails
.
forEach
(
item
=>
{
computed
:
{
flatList
()
{
let
arr
=
[]
;
this
.
orderItemDetails
.
forEach
(
(
item
)
=>
{
item
.
orderWarehouseInCommonAttrVOList
?.
forEach
((
vo
,
index
)
=>
{
arr
.
push
({
...
item
,
...
vo
,
index
,
span
:
index
===
0
?
item
.
orderWarehouseInCommonAttrVOList
?.
length
:
0
,
warehouseInId
:
item
.
id
})
})
})
return
arr
}
span
:
index
===
0
?
item
.
orderWarehouseInCommonAttrVOList
?.
length
:
0
,
warehouseInId
:
item
.
id
,
});
});
});
return
arr
;
},
},
async
created
()
{
getOrderItemCommonAttr
(
this
.
orderId
,
this
.
warehouseInId
||
0
).
then
(
res
=>
{
this
.
orderItemDetails
=
res
.
data
})
getOrderItemCommonAttr
(
this
.
orderId
,
this
.
warehouseInId
||
0
).
then
(
(
res
)
=>
{
this
.
orderItemDetails
=
res
.
data
;
}
);
},
methods
:
{
handleSelectionChange
(
e
){
console
.
log
(
"
handleSelectionChange
"
,
e
)
this
.
multipleSelection
=
e
handleSelectionChange
(
e
)
{
console
.
log
(
"
handleSelectionChange
"
,
e
)
;
this
.
multipleSelection
=
e
;
},
handleSubmit
(){
handleSubmit
()
{
// 品名+品牌+材质+商品特性+用途一致的会合并,数量累加
// https://zentao.test.jdshangmen.com/task-view-3423.html
let
arr
=
[]
this
.
multipleSelection
.
forEach
(
item
=>
{
let
index
=
arr
.
findIndex
(
i
=>
{
return
i
.
prodId
==
item
.
prodId
&&
i
.
brand
==
item
.
brand
&&
i
.
material
==
item
.
material
&&
i
.
prodAttrIds
==
item
.
prodAttrIds
&&
i
.
usageIds
==
item
.
usageIds
})
let
arr
=
[];
this
.
multipleSelection
.
forEach
((
item
)
=>
{
let
index
=
arr
.
findIndex
((
i
)
=>
{
return
(
i
.
prodId
==
item
.
prodId
&&
i
.
brand
==
item
.
brand
&&
i
.
material
==
item
.
material
&&
i
.
prodAttrIds
==
item
.
prodAttrIds
&&
i
.
usageIds
==
item
.
usageIds
);
});
if
(
index
==
-
1
)
{
arr
.
push
({
...
item
})
arr
.
push
({
...
item
});
}
else
{
arr
[
index
].
quantityAll
+=
item
.
quantityAll
arr
[
index
].
quantityAll
+=
item
.
quantityAll
;
}
})
})
;
// 如果某条入仓记录下的箱明细被全部选中了,则需要将他的快递单号和影像带过去
const
expressNos
=
[]
const
pictureUrls
=
[]
const
expressNos
=
[]
;
const
pictureUrls
=
[]
;
this
.
orderItemDetails
.
forEach
((
warehouseIn
,
index
)
=>
{
// 本条入仓记录被选中的明细数
const
selectedCount
=
this
.
multipleSelection
.
filter
(
item
=>
item
.
warehouseInId
==
warehouseIn
.
id
).
length
if
(
selectedCount
==
warehouseIn
.
orderWarehouseInCommonAttrVOList
?.
length
){
if
(
warehouseIn
.
expressNo
){
expressNos
.
push
(
warehouseIn
.
expressNo
)
const
selectedCount
=
this
.
multipleSelection
.
filter
(
(
item
)
=>
item
.
warehouseInId
==
warehouseIn
.
id
).
length
;
if
(
selectedCount
==
warehouseIn
.
orderWarehouseInCommonAttrVOList
?.
length
)
{
if
(
warehouseIn
.
expressNo
)
{
expressNos
.
push
(
warehouseIn
.
expressNo
);
}
if
(
warehouseIn
.
pictureUrls
?.
length
)
{
pictureUrls
.
push
(...
warehouseIn
.
pictureUrls
)
if
(
warehouseIn
.
pictureUrls
?.
length
)
{
pictureUrls
.
push
(...
warehouseIn
.
pictureUrls
)
;
}
}
})
})
;
// 根据warehouseInId 给对应的入仓记录追加快递单号和影像
// 存到全局变量,在调用对应finishPack接口的时候判断追加
window
.
ChooseOrderProductsExpressNos
=
expressNos
window
.
ChooseOrderProductsPictureUrls
=
pictureUrls
window
.
ChooseOrderProductsExpressNos
=
expressNos
;
window
.
ChooseOrderProductsPictureUrls
=
pictureUrls
;
this
.
$emit
(
"
success
"
,
arr
)
this
.
$emit
(
"
success
"
,
arr
)
;
},
handleClose
()
{
this
.
visible
=
false
this
.
visible
=
false
;
},
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
if
(
columnIndex
>
6
)
{
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
columnIndex
>
6
)
{
return
{
rowspan
:
row
.
span
,
colspan
:
1
}
colspan
:
1
,
}
;
}
return
{
rowspan
:
1
,
colspan
:
1
}
}
}
}
colspan
:
1
,
}
;
}
,
}
,
}
;
</
script
>
<
style
scoped
lang=
"scss"
>
.table
{
::v-deep
{
th
.el-table__cell.is-leaf
,
td
.el-table__cell
{
.table
{
::v-deep
{
th
.el-table__cell.is-leaf
,
td
.el-table__cell
{
border-bottom
:
1px
solid
#9b9b9b
;
}
.el-checkbox__inner
{
border
:
2px
solid
#9b9b9b
;
.el-checkbox__inner
{
border
:
2px
solid
#9b9b9b
;
}
}
}
...
...
src/views/ecw/order/stocking/index.vue
View file @
b503e130
...
...
@@ -2,71 +2,123 @@
<
template
>
<div
class=
"app-container"
>
<h2>
{{
title
}}
-
{{
order
.
orderNo
}}
</h2>
<order-base-info
:order=
"order"
stocking
></order-base-info>
<div
class=
"flex items-center"
>
<div
class=
"flex-1 page-title"
>
{{
$t
(
'
货物信息
'
)
}}
</div>
<el-button
type=
"primary"
@
click=
"showNewProductDialog=true"
>
{{
$t
(
'
添加新品名
'
)
}}
</el-button>
<div
class=
"flex-1 page-title"
>
{{
$t
(
"
货物信息
"
)
}}
</div>
<el-button
type=
"primary"
@
click=
"showNewProductDialog = true"
>
{{
$t
(
"
添加新品名
"
)
}}
</el-button>
</div>
<!--
未入仓的不显示 https://zentao.test.jdshangmen.com/bug-view-5292.html
-->
<el-table
v-if=
"order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0"
v-if=
"
order.orderItemVOList &&
order.orderItemVOList.length > 0 &&
orderItemList &&
orderItemList.length > 0
"
:data=
"order.orderItemVOList || []"
default-expand-all
style=
"width: 100%"
>
style=
"width: 100%"
>
<!--入仓记录-->
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<div
style=
"padding-left: 80px"
v-if=
"orderWarehouseInList(props.row.orderItemId).length"
>
<div
style=
"padding-left: 80px"
v-if=
"orderWarehouseInList(props.row.orderItemId).length"
>
<el-table
:data=
"orderWarehouseInList(props.row.orderItemId)"
>
<el-table-column
:label=
"$t('序号')"
width=
"80px"
>
<template
slot-scope=
"
{
row, column, $index
}">
{{
$index
+
1
}}
<template
slot-scope=
"
{
row, column, $index
}">
{{
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"cartonsNum"
:label=
"$t('箱数')"
width=
"60px"
></el-table-column>
<el-table-column
prop=
"cartonsNum"
:label=
"$t('箱数')"
width=
"60px"
></el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('入仓类型')"
>
<
template
v-slot=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
></dict-tag>
<
template
v-slot=
"{ row }"
>
<dict-tag
:type=
"DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE"
:value=
"row.specificationType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('包装类型')"
>
<
template
v-slot=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
:value=
"row.unit"
></dict-tag>
<
template
v-slot=
"{ row }"
>
<dict-tag
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
:value=
"row.unit"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('长') + '(cm)'"
width=
"70px"
>
<
template
v-slot=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
0
]
}}
</
template
>
<el-table-column
prop=
"areaName"
:label=
"$t('长') + '(cm)'"
width=
"70px"
>
<
template
v-slot=
"{ row }"
>
{{
row
.
boxGauge
.
split
(
"
*
"
)[
0
]
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('宽') + '(cm)'"
width=
"70px"
>
<
template
v-slot=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
1
]
}}
</
template
>
<el-table-column
prop=
"areaName"
:label=
"$t('宽') + '(cm)'"
width=
"70px"
>
<
template
v-slot=
"{ row }"
>
{{
row
.
boxGauge
.
split
(
"
*
"
)[
1
]
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('高') + '(cm)'"
width=
"70px"
>
<
template
v-slot=
"{row}"
>
{{
row
.
boxGauge
.
split
(
'
*
'
)[
2
]
}}
</
template
>
<el-table-column
prop=
"areaName"
:label=
"$t('高') + '(cm)'"
width=
"70px"
>
<
template
v-slot=
"{ row }"
>
{{
row
.
boxGauge
.
split
(
"
*
"
)[
2
]
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"volume"
:label=
"$t('体积')+'(m³)'"
></el-table-column>
<el-table-column
prop=
"weight"
:label=
"$t('重量')+'(kg)'"
></el-table-column>
<el-table-column
prop=
"quantityAll"
:label=
"$t('数量') + '(个)'"
></el-table-column>
<el-table-column
prop=
"expressNo"
:label=
"$t('快递单号')"
></el-table-column>
<el-table-column
prop=
"volume"
:label=
"$t('体积') + '(m³)'"
></el-table-column>
<el-table-column
prop=
"weight"
:label=
"$t('重量') + '(kg)'"
></el-table-column>
<el-table-column
prop=
"quantityAll"
:label=
"$t('数量') + '(个)'"
></el-table-column>
<el-table-column
prop=
"expressNo"
:label=
"$t('快递单号')"
></el-table-column>
<el-table-column
prop=
"createTime"
:label=
"$t('首次入仓时间')"
>
<
template
v-slot=
"{row}"
>
{{
parseTime
(
row
.
inTime
)
}}
</
template
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
inTime
)
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('储位')"
>
<
template
v-slot=
"{
row
}"
>
{{
row
.
orderLocationStr4Merge
}}
<
template
v-slot=
"{
row
}"
>
{{
row
.
orderLocationStr4Merge
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
:label=
"$t('影像')"
>
<
template
v-slot=
"{row}"
>
<el-button
type=
"text"
@
click=
"showMedia(props.row)"
>
{{
$t
(
'
查看
'
)
}}
</el-button>
<
template
v-slot=
"{ row }"
>
<el-button
type=
"text"
@
click=
"showMedia(props.row)"
>
{{
$t
(
"
查看
"
)
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"areaName"
width=
"220px"
>
<
template
v-slot=
"{
row
}"
>
<
template
v-slot=
"{
row
}"
>
<WarehouseRecordDetail
v-model=
"row.orderWarehouseInDetailsVOList"
@
input=
"saveDetail(props.row, row.id)"
...
...
@@ -75,8 +127,20 @@
:warehouse-in-id=
"row.id"
@
close=
"clearAppendExpressNoAndPictures"
/>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"primary"
@
click=
"package(props.row, $t('修改打包'))"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"danger"
@
click=
"package(props.row, $t('修改打包'))"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"primary"
@
click=
"package(props.row, $t('修改打包'))"
>
{{
$t
(
"
修改
"
)
}}
</el-button
>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"danger"
@
click=
"package(props.row, $t('修改打包'))"
>
{{
$t
(
"
删除
"
)
}}
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -84,101 +148,128 @@
</template>
</el-table-column>
<el-table-column
type=
"index"
width=
"50"
:label=
"$t('序号')"
>
<el-table-column
type=
"index"
width=
"50"
:label=
"$t('序号')"
>
</el-table-column>
<el-table-column
prop=
"prodTitleZh"
:label=
"$t('品名')"
>
<
template
v-slot=
"{row}"
>
{{
row
.
prodTitleZh
}}
<br>
<el-table-column
prop=
"prodTitleZh"
:label=
"$t('品名')"
>
<
template
v-slot=
"{ row }"
>
{{
row
.
prodTitleZh
}}
<br
/>
{{
row
.
prodTitleEn
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('填单货物属性')"
>
<
template
v-slot=
"{row}"
>
<span
v-if=
"row.isWarehouseInAdd"
>
{{
$t
(
'
非填单货物信息
'
)
}}
</span>
<el-table-column
:label=
"$t('填单货物属性')"
>
<
template
v-slot=
"{ row }"
>
<span
v-if=
"row.isWarehouseInAdd"
>
{{
$t
(
"
非填单货物信息
"
)
}}
</span>
<template
v-else
>
{{
$t
(
'
品牌
'
)
}}
:
{{
[
$t
(
'
无牌
'
),
$t
(
'
有牌
'
),
$t
(
'
中性
'
)][
row
.
brandType
]
}}
<br>
{{
$t
(
'
箱数
'
)
}}
:
{{
row
.
num
}}
<br>
{{
$t
(
'
体积
'
)
}}
:
{{
row
.
volume
}}
m³
<br>
{{
$t
(
'
重量
'
)
}}
:
{{
row
.
weight
}}
Kg
{{
$t
(
"
品牌
"
)
}}
:
{{
[
$t
(
"
无牌
"
),
$t
(
"
有牌
"
),
$t
(
"
中性
"
)][
row
.
brandType
]
}}
<br
/>
{{
$t
(
"
箱数
"
)
}}
:
{{
row
.
num
}}
<br
/>
{{
$t
(
"
体积
"
)
}}
:
{{
row
.
volume
}}
m³
<br
/>
{{
$t
(
"
重量
"
)
}}
:
{{
row
.
weight
}}
Kg
</
template
>
</template>
</el-table-column>
<el-table-column
:label=
"$t('入库货物属性')"
>
<
template
v-slot=
"{row}"
>
<el-table-column
:label=
"$t('入库货物属性')"
>
<
template
v-slot=
"{ row }"
>
<template
v-if=
"row.warehouseInInfoVO"
>
{{
$t
(
'
品牌
'
)
}}
:
{{
row
.
brandName
}}
<br
>
{{
$t
(
'
箱数
'
)
}}
:
{{
row
.
warehouseInInfoVO
.
cartonsNum
}}
<br
>
{{
$t
(
'
体积
'
)
}}
:
{{
row
.
warehouseInInfoVO
.
volume
}}
m³
<br
>
{{
$t
(
'
重量
'
)
}}
:
{{
row
.
warehouseInInfoVO
.
weight
}}
Kg
{{
$t
(
"
品牌
"
)
}}
:
{{
row
.
brandName
}}
<br
/
>
{{
$t
(
"
箱数
"
)
}}
:
{{
row
.
warehouseInInfoVO
.
cartonsNum
}}
<br
/
>
{{
$t
(
"
体积
"
)
}}
:
{{
row
.
warehouseInInfoVO
.
volume
}}
m³
<br
/
>
{{
$t
(
"
重量
"
)
}}
:
{{
row
.
warehouseInInfoVO
.
weight
}}
Kg
</
template
>
<span
v-else
>
{{
$t('暂无入仓信息')
}}
</span>
<span
v-else
>
{{
$t("暂无入仓信息")
}}
</span>
</template>
</el-table-column>
<el-table-column
prop=
"expressNo"
v-slot=
"{row}"
:label=
"$t('快递单号')"
>
{{ row.expressNo || (row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : '') }}
v-slot=
"{ row }"
:label=
"$t('快递单号')"
>
{{
row.expressNo ||
(row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : "")
}}
</el-table-column>
<el-table-column
v-slot=
"{row}"
:label=
"$t('商品特性')"
>
<el-table-column
v-slot=
"{ row }"
:label=
"$t('商品特性')"
>
<
template
v-if=
"row.prodAttrIds"
>
{{
showAttr
(
row
.
prodAttrIds
)
}}
{{
showAttr
(
row
.
prodAttrIds
)
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"createTime"
:label=
"$t('最后操作时间')"
>
<
template
v-slot=
"{row}"
>
<el-table-column
prop=
"createTime"
:label=
"$t('最后操作时间')"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
updateTime
)
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"diffType"
v-slot=
"{row}"
:label=
"$t('状态')"
>
<el-table-column
prop=
"diffType"
v-slot=
"{ row }"
:label=
"$t('状态')"
>
<dict-tag
v-if=
"row.warehouseInInfoVO && row.warehouseInInfoVO.diffType"
:type=
"DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS"
:value=
"row.warehouseInInfoVO.diffType"
class=
"red"
:class=
"{
green: row.warehouseInInfoVO.diffType === 4
}"
:class=
"{
green: row.warehouseInInfoVO.diffType === 4
}"
/>
<span
:class=
"{red: row.itemStatus === 3}"
v-else
>
{{ row.itemStatus === 3 ? ($t('少了') + row.num + $t('箱')) : $t('待入仓') }}
</span>
<span
class=
"red"
v-if=
"row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff"
>
{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}
</span>
<span
:class=
"{ red: row.itemStatus === 3 }"
v-else
>
{{
row.itemStatus === 3 ? $t("少了") + row.num + $t("箱") : $t("待入仓")
}}
</span>
<span
class=
"red"
v-if=
"row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff"
>
{{ row.warehouseInInfoVO.cartonsNumDiff }}{{ $t("箱") }}
</span
>
</el-table-column>
<el-table-column
prop=
"createTime"
:label=
"$t('打包状态')"
width=
"100"
>
<
template
v-slot=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_ITEM_PACK_STATUS"
:value=
"wareItemPackStatus(row.orderItemId)"
/>
<el-table-column
prop=
"createTime"
:label=
"$t('打包状态')"
width=
"100"
>
<
template
v-slot=
"{ row }"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_ITEM_PACK_STATUS"
:value=
"wareItemPackStatus(row.orderItemId)"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
:label=
"$t('操作')"
width=
"250"
>
<el-table-column
prop=
"address"
:label=
"$t('操作')"
width=
"250"
>
<
template
v-slot=
"{ row, column, $index }"
>
<!--没有入仓记录的不显示打包按钮 https://zentao.test.jdshangmen.com/bug-view-5389.html-->
<el-button-group
v-if=
"orderWarehouseInList(row.orderItemId).length"
>
<template
v-if=
"wareItemPackStatus(row.orderItemId) == 1"
>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"warning"
@
click=
"noNeedPack(row)"
>
{{
$t
(
'
无需打包
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"package(row, $t('打包'))"
>
{{
$t
(
'
打包
'
)
}}
</el-button>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"warning"
@
click=
"noNeedPack(row)"
>
{{
$t
(
"
无需打包
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"package(row, $t('打包'))"
>
{{
$t
(
"
打包
"
)
}}
</el-button
>
</
template
>
<el-button
class=
"pl-5 pr-5"
v-else
size=
"mini"
type=
"primary"
@
click=
"package(row, $t('修改打包'))"
>
{{$t('修改打包')}}
</el-button>
<el-tooltip
:content=
"$t('请确认货物打包完成再并箱')"
:value=
"true"
manual
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"rollback(row)"
>
{{$t('并箱')}}
</el-button>
<el-button
class=
"pl-5 pr-5"
v-else
size=
"mini"
type=
"primary"
@
click=
"package(row, $t('修改打包'))"
>
{{ $t("修改打包") }}
</el-button
>
<el-tooltip
:content=
"$t('请确认货物打包完成再并箱')"
:value=
"true"
manual
>
<el-button
size=
"mini"
type=
"danger"
@
click=
"rollback(row)"
>
{{
$t("并箱")
}}
</el-button>
</el-tooltip>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"info"
@
click=
"printTag"
>
{{$t('打印标签')}}
</el-button>
<el-button
class=
"pl-5 pr-5"
size=
"mini"
type=
"info"
@
click=
"printTag"
>
{{ $t("打印标签") }}
</el-button
>
</el-button-group>
</template>
</el-table-column>
...
...
@@ -199,76 +290,119 @@
</el-input>
</el-form-item>-->
<h2>
{{
$t('订单数据')
}}
</h2>
<h2>
{{
$t("订单数据")
}}
</h2>
<el-form-item
:label=
"$t('下单统计')"
class=
"mb-0"
>
{{ $t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
{{
$t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
num: statistics.sumNumInput,
weight: statistics.sumWeightInput,
volume: statistics.sumVolumeInput,
quantity: statistics.sumQuantityInput
}) }}
quantity: statistics.sumQuantityInput,
})
}}
</el-form-item>
<el-form-item
:label=
"$t('入仓统计')"
class=
"mb-0"
>
{{ $t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
{{
$t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
num: statistics.sumCartonsNumFinishedWarehouseIn,
weight: statistics.sumWeightFinishedWarehouseIn,
volume: statistics.sumVolumeFinishedWarehouseIn,
quantity: statistics.sumQuantityAllFinishedWarehouseIn
}) }}
quantity: statistics.sumQuantityAllFinishedWarehouseIn,
})
}}
</el-form-item>
<el-form-item
:label=
"$t('打包前统计')"
class=
"mb-0"
>
{{ $t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
{{
$t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
num: statistics.sumCartonsNumPrevPacked,
weight: statistics.sumWeightPrevPacked,
volume: statistics.sumVolumePrevPacked,
quantity: statistics.sumQuantityAllPrevPacked
}) }}
quantity: statistics.sumQuantityAllPrevPacked,
})
}}
</el-form-item>
<el-form-item
:label=
"$t('打包后统计')"
class=
"mb-0"
>
{{ $t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
{{
$t(`{num}箱 {weight}Kg {volume}m³ {quantity}个`, {
num: statistics.sumNum,
weight: statistics.sumWeight,
volume: statistics.sumVolume,
quantity: statistics.sumQuantity
}) }}
quantity: statistics.sumQuantity,
})
}}
</el-form-item>
<el-card
style=
"margin-top: 15px
;
"
>
<el-card
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
style=
"font-size: 18px"
>
{{
$t('入仓影像')
}}
</span>
<span
style=
"font-size: 18px"
>
{{
$t("入仓影像")
}}
</span>
</div>
<div>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"pictureUrls"
readonly
></image-and-video-upload>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"pictureUrls"
readonly
></image-and-video-upload>
</div>
</el-card>
<div
style=
"text-align: center;margin-top: 15px"
>
<el-button
@
click=
"escapeBol = true;"
type=
"primary"
>
{{$t('转异')}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{$t('完成备货')}}
</el-button>
<el-button
type=
"info"
@
click=
"printTag"
>
{{$t('打印标签')}}
</el-button>
<div
style=
"text-align: center; margin-top: 15px"
>
<el-button
@
click=
"escapeBol = true"
type=
"primary"
>
{{
$t("转异")
}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{
$t("完成备货")
}}
</el-button>
<el-button
type=
"info"
@
click=
"printTag"
>
{{
$t("打印标签")
}}
</el-button>
</div>
</el-form>
<el-dialog
:title=
"order.orderNo + $t('订单转异')"
center
:visible.sync=
"escapeBol"
>
<el-form
label-position=
"top"
label-width=
"200"
ref=
"exceptionForm"
:model=
"form"
:rules=
"exceptionRules"
>
<el-dialog
:title=
"order.orderNo + $t('订单转异')"
center
:visible.sync=
"escapeBol"
>
<el-form
label-position=
"top"
label-width=
"200"
ref=
"exceptionForm"
:model=
"form"
:rules=
"exceptionRules"
>
<el-form-item
:label=
"$t('异常类型')"
prop=
"manualExceptionType"
>
<dict-selector
v-model=
"form.manualExceptionType"
form-type=
"checkbox"
:type=
"DICT_TYPE.STOCK_UP_EXCEPTION_TYPE"
multiple
></dict-selector>
<dict-selector
v-model=
"form.manualExceptionType"
form-type=
"checkbox"
:type=
"DICT_TYPE.STOCK_UP_EXCEPTION_TYPE"
multiple
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('附件')"
>
<!--<image-upload v-model="form.exceptionUrls"></image-upload>-->
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.exceptionUrls"
></image-and-video-upload>
<image-and-video-upload
:fileSize=
"50"
:isShowTip=
"true"
v-model=
"form.exceptionUrls"
></image-and-video-upload>
</el-form-item>
<el-form-item
:label=
"$t('详细信息')"
>
<el-input
v-model=
"form.descZh"
type=
"textarea"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleException"
>
{{$t('确认并完成打包')}}
</el-button>
<el-button
@
click=
"escapeBol = false"
>
{{$t('取消')}}
</el-button>
<el-button
type=
"primary"
@
click=
"handleException"
>
{{
$t("确认并完成打包")
}}
</el-button>
<el-button
@
click=
"escapeBol = false"
>
{{ $t("取消") }}
</el-button>
</span>
</el-dialog>
<print-tag
v-if=
"isShowPrintTag"
:order-id=
"orderId"
@
close=
"isShowPrintTag = false"
></print-tag>
<print-tag
v-if=
"isShowPrintTag"
:order-id=
"orderId"
@
close=
"isShowPrintTag = false"
></print-tag>
<package
:order=
"order"
:order-item-a=
"packageOrderItem"
...
...
@@ -277,46 +411,56 @@
v-if=
"!!packageOrderItem"
@
close=
"onPackageClose"
></package>
<new-product
:order=
"order"
v-if=
"showNewProductDialog"
@
close=
"onPackageClose"
></new-product>
<media-dialog
v-if=
"curPictrues"
:value=
"curPictrues"
@
close=
"curPictrues=null"
></media-dialog>
<print-tag
v-if=
"showPrintTagDialog"
:order-id=
"orderId"
@
close=
"showPrintTagDialog=false"
:warehouse-in-num=
"order.sumNum"
/>
<media-dialog
v-if=
"curPictrues"
:value=
"curPictrues"
@
close=
"curPictrues = null"
></media-dialog>
<print-tag
v-if=
"showPrintTagDialog"
:order-id=
"orderId"
@
close=
"showPrintTagDialog = false"
:warehouse-in-num=
"order.sumNum"
/>
</div>
</template>
<
script
>
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
;
import
{
finishPacked
,
finishStock
,
getOrder
,
getOrderWarehouseIn
,
getSpecialListByOrderId
,
noNeedPack
,
rollbackDelete
,
noNeedPack
,
rollbackDelete
,
warehousePictureList
,
getPackStatistics
}
from
'
@/api/ecw/order
'
import
orderBaseInfo
from
"
@/components/OrderBaseInfo
"
import
WarehouseAreaDialog
from
'
@/components/WarehouseAreaDialog
'
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
import
PrintTag
from
"
@/views/ecw/order/components/PrintTag
"
import
PrintWarehouseReceipt
from
"
@/views/ecw/order/components/PrintWarehouseReceipt
"
getPackStatistics
,
}
from
"
@/api/ecw/order
"
;
import
orderBaseInfo
from
"
@/components/OrderBaseInfo
"
;
import
WarehouseAreaDialog
from
"
@/components/WarehouseAreaDialog
"
;
import
{
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
PrintTag
from
"
@/views/ecw/order/components/PrintTag
"
;
import
PrintWarehouseReceipt
from
"
@/views/ecw/order/components/PrintWarehouseReceipt
"
;
import
imageUpload
from
"
@/components/ImageUpload
"
;
import
{
parseTime
}
from
"
@/utils/ruoyi
"
import
ImageAndVideoUpload
from
'
@/components/ImageAndVideoUpload
'
import
Package
from
'
./components/Package
'
import
{
parseTime
}
from
"
@/utils/ruoyi
"
;
import
ImageAndVideoUpload
from
"
@/components/ImageAndVideoUpload
"
;
import
Package
from
"
./components/Package
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
MediaDialog
from
"
@/views/ecw/order/stocking/components/MediaDialog.vue
"
;
import
WarehouseRecordDetail
from
"
@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue
"
;
import
{
formatTime
}
from
"
../../../../utils
"
;
import
{
formatTime
}
from
"
../../../../utils
"
;
export
default
{
name
:
"
Stocking
"
,
components
:
{
WarehouseRecordDetail
,
MediaDialog
,
...
...
@@ -328,18 +472,21 @@ export default {
imageUpload
,
ImageAndVideoUpload
,
Package
,
NewProduct
:
()
=>
import
(
'
@/views/ecw/order/stocking/components/NewProduct.vue
'
)
NewProduct
:
()
=>
import
(
"
@/views/ecw/order/stocking/components/NewProduct.vue
"
),
},
mounted
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
orderId
=
parseInt
(
this
.
$route
.
query
.
id
||
undefined
)
if
(
this
.
$route
.
query
.
id
)
{
this
.
orderId
=
parseInt
(
this
.
$route
.
query
.
id
||
undefined
)
;
getSpecialListByOrderId
(
this
.
orderId
).
then
(
r
=>
this
.
specialList
=
r
.
data
)
this
.
getList
()
getSpecialListByOrderId
(
this
.
orderId
).
then
(
(
r
)
=>
(
this
.
specialList
=
r
.
data
)
);
this
.
getList
();
}
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getProductAttrList
().
then
(
res
=>
this
.
productAttrList
=
res
.
data
)
getCurrencyList
().
then
(
(
res
)
=>
(
this
.
currencyList
=
res
.
data
));
getProductAttrList
().
then
(
(
res
)
=>
(
this
.
productAttrList
=
res
.
data
));
},
data
()
{
...
...
@@ -350,13 +497,13 @@ export default {
finishVisible
:
false
,
warehousingVisible
:
false
,
form
:
{
exceptionUrls
:[],
descZh
:
''
,
manualExceptionType
:[],
sumVolume
:
''
,
sumWeight
:
''
,
exceptionUrls
:
[],
descZh
:
""
,
manualExceptionType
:
[],
sumVolume
:
""
,
sumWeight
:
""
,
},
currencyList
:[],
currencyList
:
[],
order
:
{},
orderId
:
undefined
,
orderItemList
:
[],
...
...
@@ -364,29 +511,30 @@ export default {
warehousing
:
undefined
,
isShowPrintTag
:
false
,
isShowPrint
:
false
,
escapeBol
:
false
,
escapeBol
:
false
,
label
:
{
"
orderId
"
:
0
,
"
orderLabelDtoList
"
:
[
orderId
:
0
,
orderLabelDtoList
:
[
{
"
end
"
:
0
,
"
start
"
:
0
}
]
end
:
0
,
start
:
0
,
}
,
]
,
},
exceptionRules
:
{
manualExceptionType
:
[
{
required
:
true
,
message
:
'
请勾选原因类型
'
,
trigger
:
'
change
'
},
{
required
:
true
,
message
:
"
请勾选原因类型
"
,
trigger
:
"
change
"
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<=
0
)
{
callback
(
new
Error
(
'
请勾选原因类型
'
))
}
callback
()
},
trigger
:
'
change
'
callback
(
new
Error
(
"
请勾选原因类型
"
));
}
]
callback
();
},
trigger
:
"
change
"
,
},
],
},
// 打包弹层的标题
packageTitle
:
null
,
...
...
@@ -402,176 +550,204 @@ export default {
// 是否显示打印标签弹层
showPrintTagDialog
:
false
,
// 统计数据
statistics
:
{}
}
statistics
:
{},
}
;
},
methods
:
{
formatTime
,
getStatistics
()
{
console
.
log
(
'
获取统计数据
'
)
getPackStatistics
(
this
.
orderId
).
then
(
res
=>
{
this
.
statistics
=
res
.
data
})
},
getOrderItemList
(){
this
.
orderItemList
=
[]
return
getOrderWarehouseIn
(
this
.
orderId
).
then
(
r
=>
this
.
orderItemList
=
r
.
data
)
},
getList
(){
this
.
getOrder
()
this
.
getOrderItemList
()
this
.
getStatistics
()
},
getWarehousePictureList
(){
console
.
log
(
"
获取统计数据
"
);
getPackStatistics
(
this
.
orderId
).
then
((
res
)
=>
{
this
.
statistics
=
res
.
data
;
});
},
getOrderItemList
()
{
this
.
orderItemList
=
[];
return
getOrderWarehouseIn
(
this
.
orderId
).
then
(
(
r
)
=>
(
this
.
orderItemList
=
r
.
data
)
);
},
getList
()
{
this
.
getOrder
();
this
.
getOrderItemList
();
this
.
getStatistics
();
},
getWarehousePictureList
()
{
return
warehousePictureList
({
bizId
:
this
.
order
.
orderId
,
type
:
1
}).
then
(
r
=>
{
this
.
form
.
urls
=
r
.
data
.
map
(
i
=>
i
.
url
)
})
type
:
1
,
}).
then
(
(
r
)
=>
{
this
.
form
.
urls
=
r
.
data
.
map
(
(
i
)
=>
i
.
url
);
})
;
},
include
(){
include
()
{
return
(
state
,
arr
)
=>
{
return
arr
.
indexOf
(
state
)
>
-
1
}
return
arr
.
indexOf
(
state
)
>
-
1
;
}
;
},
exclude
(){
exclude
()
{
return
(
state
,
arr
)
=>
{
return
arr
.
indexOf
(
state
)
==
-
1
}
return
arr
.
indexOf
(
state
)
==
-
1
;
}
;
},
getOrder
(){
return
getOrder
(
this
.
orderId
).
then
(
r
=>
{
getOrder
()
{
return
getOrder
(
this
.
orderId
)
.
then
((
r
)
=>
{
// 获取渠道可出特性文案用户订单基础信息显示
r
.
data
.
channelAttrName
=
this
.
showAttr
(
r
.
data
.
channelAttrId
)
this
.
order
=
r
.
data
this
.
form
.
sumVolume
=
this
.
order
.
sumVolume
this
.
form
.
sumWeight
=
this
.
order
.
sumWeight
}).
then
(()
=>
{
// this.getLabelByOrder()
this
.
getWarehousePictureList
()
r
.
data
.
channelAttrName
=
this
.
showAttr
(
r
.
data
.
channelAttrId
);
this
.
order
=
r
.
data
;
this
.
form
.
sumVolume
=
this
.
order
.
sumVolume
;
this
.
form
.
sumWeight
=
this
.
order
.
sumWeight
;
})
.
then
(()
=>
{
// this.getLabelByOrder()
this
.
getWarehousePictureList
();
});
},
// 提交转异
handleException
()
{
this
.
$refs
.
exceptionForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
handleSubmit
()
this
.
handleSubmit
()
;
}
else
{
this
.
$message
.
warning
(
'
请勾选原因类型
'
)
this
.
$message
.
warning
(
"
请勾选原因类型
"
);
}
})
})
;
},
// 完成备货
async
handleSubmit
()
{
let
unpackProds
=
[]
this
.
orderItemList
.
forEach
(
item
=>
{
let
unpackProds
=
[]
;
this
.
orderItemList
.
forEach
(
(
item
)
=>
{
// 有入仓记录且未打包
if
(
item
.
orderWarehouseInBackItemDoList
.
length
&&
item
.
packStatus
==
1
){
unpackProds
.
push
(
this
.
$l
(
item
,
'
prodTitle
'
))
if
(
item
.
orderWarehouseInBackItemDoList
.
length
&&
item
.
packStatus
==
1
)
{
unpackProds
.
push
(
this
.
$l
(
item
,
"
prodTitle
"
));
}
})
if
(
unpackProds
.
length
){
return
this
.
$alert
(
`商品
${
unpackProds
.
join
(
'
,
'
)}
未完成打包,无法完成备货`
,
this
.
$t
(
'
提示
'
))
});
if
(
unpackProds
.
length
)
{
return
this
.
$alert
(
`商品
${
unpackProds
.
join
(
"
,
"
)}
未完成打包,无法完成备货`
,
this
.
$t
(
"
提示
"
)
);
}
let
form
=
{...
this
.
form
}
form
.
orderId
=
this
.
orderId
form
.
manualExceptionType
=
form
.
manualExceptionType
.
join
(
'
,
'
)
finishStock
(
form
).
then
(
res
=>
{
let
form
=
{
...
this
.
form
};
form
.
orderId
=
this
.
orderId
;
form
.
manualExceptionType
=
form
.
manualExceptionType
.
join
(
"
,
"
);
finishStock
(
form
)
.
then
((
res
)
=>
{
return
this
.
$confirm
(
"
备货成功,是否需要打印标签
"
).
catch
(()
=>
{
this
.
$tab
.
closePage
()
})
}).
then
(()
=>
{
this
.
printTag
()
this
.
$tab
.
closePage
();
});
})
.
then
(()
=>
{
this
.
printTag
();
});
},
// 显示打包弹层
package
(
row
,
title
=
null
){
this
.
packageOrderItem
=
row
this
.
packageWarehouseItem
=
this
.
orderItemList
.
find
(
item
=>
item
.
orderItemId
===
row
.
orderItemId
)
this
.
packageTitle
=
title
||
this
.
$t
(
'
打包
'
)
package
(
row
,
title
=
null
)
{
this
.
packageOrderItem
=
row
;
this
.
packageWarehouseItem
=
this
.
orderItemList
.
find
(
(
item
)
=>
item
.
orderItemId
===
row
.
orderItemId
);
this
.
packageTitle
=
title
||
this
.
$t
(
"
打包
"
);
},
// 无需打包
noNeedPack
(
row
){
noNeedPack
(
row
.
orderItemId
).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
})
},
onPackageClose
(){
this
.
packageOrderItem
=
null
;
this
.
packageOrderItem
=
null
;
this
.
showNewProductDialog
=
false
this
.
getList
()
},
showMedia
(
orderItem
){
console
.
log
(
'
查看影像
'
,
orderItem
)
const
wareItem
=
this
.
wareItem
(
orderItem
.
orderItemId
)
if
(
!
wareItem
.
pictureUrls
)
{
return
this
.
$message
.
info
(
this
.
$t
(
'
暂无影像
'
))
noNeedPack
(
row
)
{
noNeedPack
(
row
.
orderItemId
).
then
(
(
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
操作成功
"
));
this
.
getList
()
;
})
;
},
onPackageClose
()
{
this
.
packageOrderItem
=
null
;
this
.
packageOrderItem
=
null
;
this
.
showNewProductDialog
=
false
;
this
.
getList
()
;
},
showMedia
(
orderItem
)
{
console
.
log
(
"
查看影像
"
,
orderItem
);
const
wareItem
=
this
.
wareItem
(
orderItem
.
orderItemId
)
;
if
(
!
wareItem
.
pictureUrls
)
{
return
this
.
$message
.
info
(
this
.
$t
(
"
暂无影像
"
));
}
this
.
curPictrues
=
wareItem
.
pictureUrls
||
[]
this
.
curPictrues
=
wareItem
.
pictureUrls
||
[]
;
},
// 保存箱明细
saveDetail
(
row
,
warehouseInId
){
const
wareItem
=
this
.
wareItem
(
row
.
orderItemId
)
const
orderWarehouseInItemDtoList
=
wareItem
.
orderWarehouseInBackItemDoList
orderWarehouseInItemDtoList
.
map
(
item
=>
{
item
.
orderLocationCreateReqVOList
=
item
.
orderLocationBackVOList
||
[]
return
item
})
let
pictures
=
wareItem
.
pictureUrls
||
[]
if
(
window
.
ChooseOrderProductsPictureUrls
?.
length
){
pictures
.
push
(...
window
.
ChooseOrderProductsPictureUrls
)
saveDetail
(
row
,
warehouseInId
)
{
//lanbm 2024-06-15 添加注释
//alert(warehouseInId);
const
wareItem
=
this
.
wareItem
(
row
.
orderItemId
);
const
orderWarehouseInItemDtoList
=
wareItem
.
orderWarehouseInBackItemDoList
;
orderWarehouseInItemDtoList
.
map
((
item
)
=>
{
item
.
orderLocationCreateReqVOList
=
item
.
orderLocationBackVOList
||
[];
return
item
;
});
let
pictures
=
wareItem
.
pictureUrls
||
[];
if
(
window
.
ChooseOrderProductsPictureUrls
?.
length
)
{
pictures
.
push
(...
window
.
ChooseOrderProductsPictureUrls
);
// 去重
pictures
=
Array
.
from
(
new
Set
(
pictures
))
pictures
=
Array
.
from
(
new
Set
(
pictures
))
;
}
if
(
window
.
ChooseOrderProductsExpressNos
?.
length
){
const
warehouseInItem
=
orderWarehouseInItemDtoList
.
find
(
item
=>
item
.
id
===
warehouseInId
)
if
(
!
warehouseInItem
.
expressNo
)
warehouseInItem
.
expressNo
=
""
window
.
ChooseOrderProductsExpressNos
?.
forEach
(
item
=>
{
if
(
warehouseInItem
.
expressNo
.
indexOf
(
item
)
===
-
1
){
if
(
warehouseInItem
.
expressNo
?.
length
)
warehouseInItem
.
expressNo
+=
"
,
"
warehouseInItem
.
expressNo
+=
item
if
(
window
.
ChooseOrderProductsExpressNos
?.
length
)
{
const
warehouseInItem
=
orderWarehouseInItemDtoList
.
find
(
(
item
)
=>
item
.
id
===
warehouseInId
);
if
(
!
warehouseInItem
.
expressNo
)
warehouseInItem
.
expressNo
=
""
;
window
.
ChooseOrderProductsExpressNos
?.
forEach
((
item
)
=>
{
if
(
warehouseInItem
.
expressNo
.
indexOf
(
item
)
===
-
1
)
{
if
(
warehouseInItem
.
expressNo
?.
length
)
warehouseInItem
.
expressNo
+=
"
,
"
;
warehouseInItem
.
expressNo
+=
item
;
}
})
})
;
}
const
data
=
{
orderId
:
row
.
orderId
,
orderItemId
:
row
.
orderItemId
,
orderWarehouseInItemDtoList
:
orderWarehouseInItemDtoList
,
pictureUrls
:
pictures
}
finishPacked
(
data
).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
操作成功
'
))
})
pictureUrls
:
pictures
,
};
finishPacked
(
data
).
then
((
res
)
=>
{
//lanbm 2024-06-15 调用列表加载函数
this
.
getList
();
this
.
$message
.
success
(
this
.
$t
(
"
操作成功
"
));
});
},
// 并箱
async
rollback
(
orderItem
){
this
.
$confirm
(
this
.
$l
(
orderItem
,
'
prodTitle
'
)
+
this
.
$t
(
"
并箱后不可恢复,是否确认并箱?
"
),
this
.
$t
(
'
提示
'
)).
then
(()
=>
{
async
rollback
(
orderItem
)
{
this
.
$confirm
(
this
.
$l
(
orderItem
,
"
prodTitle
"
)
+
this
.
$t
(
"
并箱后不可恢复,是否确认并箱?
"
),
this
.
$t
(
"
提示
"
)
)
.
then
(()
=>
{
return
rollbackDelete
({
orderId
:
this
.
orderId
,
orderItemId
:
orderItem
.
orderItemId
,
isPackagingRollback
:
true
})
}).
then
(
res
=>
{
this
.
$message
.
success
(
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
isPackagingRollback
:
true
,
});
})
.
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
操作成功
"
));
this
.
getList
();
});
},
printTag
(){
this
.
showPrintTagDialog
=
true
printTag
()
{
this
.
showPrintTagDialog
=
true
;
},
// 箱明细关闭后清理快递单号和影像临时数据
clearAppendExpressNoAndPictures
(){
clearAppendExpressNoAndPictures
()
{
setTimeout
(()
=>
{
window
.
ChooseOrderProductsExpressNos
=
null
window
.
ChooseOrderProductsPictureUrls
=
null
},
100
)
}
window
.
ChooseOrderProductsExpressNos
=
null
;
window
.
ChooseOrderProductsPictureUrls
=
null
;
},
100
)
;
}
,
},
watch
:
{
/*orderSpecialNeeds(val){
...
...
@@ -587,73 +763,80 @@ export default {
computed
:
{
// 根据orderItemId获取入仓item
wareItem
(){
return
orderItemId
=>
{
return
this
.
orderItemList
.
find
(
item
=>
item
.
orderItemId
==
orderItemId
)
}
wareItem
()
{
return
(
orderItemId
)
=>
{
return
this
.
orderItemList
.
find
(
(
item
)
=>
item
.
orderItemId
==
orderItemId
);
};
},
// 根据orderItemId获取入仓记录
orderWarehouseInList
(){
orderWarehouseInList
()
{
return
(
orderItemId
)
=>
{
return
this
.
wareItem
(
orderItemId
)?.
orderWarehouseInBackItemDoList
||
[]
}
return
this
.
wareItem
(
orderItemId
)?.
orderWarehouseInBackItemDoList
||
[]
;
}
;
},
// 获取打包状态
wareItemPackStatus
(){
return
orderItemId
=>
{
return
this
.
wareItem
(
orderItemId
)?.
packStatus
}
wareItemPackStatus
()
{
return
(
orderItemId
)
=>
{
return
this
.
wareItem
(
orderItemId
)?.
packStatus
;
}
;
},
title
()
{
return
this
.
$i18n
.
locale
===
'
en_US
'
?
this
.
$route
.
meta
.
titleEn
:
this
.
$route
.
name
return
this
.
$i18n
.
locale
===
"
en_US
"
?
this
.
$route
.
meta
.
titleEn
:
this
.
$route
.
name
;
},
orderSpecialNeedsDict
()
{
return
this
.
$store
.
state
.
dict
.
dictDatas
.
order_special_needs
},
orderSpecialNeeds
(){
const
result
=
[]
this
.
specialList
.
forEach
(
e
=>
{
const
t
=
this
.
orderSpecialNeedsDict
.
find
(
f
=>
f
.
value
===
e
.
advanceType
)
if
(
t
)
{
result
.
push
({...
e
,
label
:
t
.
label
,
labelEn
:
t
.
labelEn
})
return
this
.
$store
.
state
.
dict
.
dictDatas
.
order_special_needs
;
},
orderSpecialNeeds
()
{
const
result
=
[];
this
.
specialList
.
forEach
((
e
)
=>
{
const
t
=
this
.
orderSpecialNeedsDict
.
find
(
(
f
)
=>
f
.
value
===
e
.
advanceType
);
if
(
t
)
{
result
.
push
({
...
e
,
label
:
t
.
label
,
labelEn
:
t
.
labelEn
});
}
})
return
result
})
;
return
result
;
},
warehouseId
(){
return
this
.
order
?.
logisticsInfoDto
?.
startWarehouseId
warehouseId
()
{
return
this
.
order
?.
logisticsInfoDto
?.
startWarehouseId
;
},
// 显示特性
showAttr
(){
return
attrIds
=>
{
if
(
!
attrIds
)
return
''
let
attrArr
=
attrIds
.
split
(
"
,
"
).
map
(
item
=>
+
item
)
let
arr
=
[]
this
.
productAttrList
.
forEach
(
item
=>
{
if
(
attrArr
.
indexOf
(
item
.
id
)
>
-
1
)
arr
.
push
(
this
.
$l
(
item
,
'
attrName
'
))
})
return
arr
.
join
(
"
,
"
)
}
showAttr
()
{
return
(
attrIds
)
=>
{
if
(
!
attrIds
)
return
""
;
let
attrArr
=
attrIds
.
split
(
"
,
"
).
map
((
item
)
=>
+
item
);
let
arr
=
[];
this
.
productAttrList
.
forEach
((
item
)
=>
{
if
(
attrArr
.
indexOf
(
item
.
id
)
>
-
1
)
arr
.
push
(
this
.
$l
(
item
,
"
attrName
"
));
});
return
arr
.
join
(
"
,
"
);
};
},
// 全部入仓记录的入仓影像
pictureUrls
(){
let
urls
=
[]
this
.
orderItemList
.
forEach
(
item
=>
{
console
.
log
(
'
pictureUrls
'
,
item
.
pictureUrls
)
urls
=
urls
.
concat
(
item
.
pictureUrls
||
[])
})
return
urls
}
}
}
pictureUrls
()
{
let
urls
=
[]
;
this
.
orderItemList
.
forEach
(
(
item
)
=>
{
console
.
log
(
"
pictureUrls
"
,
item
.
pictureUrls
);
urls
=
urls
.
concat
(
item
.
pictureUrls
||
[])
;
})
;
return
urls
;
}
,
}
,
}
;
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"src/assets/styles/element-variables"
;
.red
{
.red
{
color
:
$--color-danger
;
}
.green
{
.green
{
color
:
$--color-success
;
}
</
style
>
src/views/ecw/order/stockingList.vue
View file @
b503e130
<!--空运备货列表-->
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
>
<el-form-item
:label=
"$t('编号')"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.numberKey"
:placeholder=
"$t('请输入订单号、唛头、提单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.numberKey"
:placeholder=
"$t('请输入订单号、唛头、提单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('发货人')"
prop=
"consignorKey"
>
<el-input
v-model=
"queryParams.consignorKey"
:placeholder=
"$t('发货人')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.consignorKey"
:placeholder=
"$t('发货人')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('收货人')"
prop=
"consigneeKey"
>
<el-input
v-model=
"queryParams.consigneeKey"
:placeholder=
"$t('收货人')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.consigneeKey"
:placeholder=
"$t('收货人')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
""
>
<dict-selector
:type=
"DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME"
:filter=
"(item) => item.value != 'PickTime'"
v-model=
"dateFilterType"
defaultable
style=
"width: 150px; margin-right: 5px"
/>
<el-date-picker
v-model=
"dateFilter"
type=
"datetimerange"
range-separator=
"-"
<dict-selector
:type=
"DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME"
:filter=
"(item) => item.value != 'PickTime'"
v-model=
"dateFilterType"
defaultable
style=
"width: 150px; margin-right: 5px"
/>
<el-date-picker
v-model=
"dateFilter"
type=
"datetimerange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd HH:mm:ss"
...
...
@@ -25,13 +48,33 @@
</el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('始发仓')"
prop=
"startWarehouseId"
>
<el-select
v-model=
"queryParams.startWarehouseId"
:placeholder=
"$t('请选择始发仓')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-select
v-model=
"queryParams.startWarehouseId"
:placeholder=
"$t('请选择始发仓')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in exportWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的仓')"
prop=
"destWarehouseId"
>
<el-select
v-model=
"queryParams.destWarehouseId"
:placeholder=
"$t('请选择目的仓')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-select
v-model=
"queryParams.destWarehouseId"
:placeholder=
"$t('请选择目的仓')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in importWarehouseList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -40,188 +83,378 @@
</el-form-item>
-->
<el-form-item
:label=
"$t('商品')"
prop=
"tidanNo"
>
<el-input
v-model=
"queryParams.prodKey"
:placeholder=
"$t('请输入商品类型、品名或品牌')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.prodKey"
:placeholder=
"$t('请输入商品类型、品名或品牌')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('控货')"
prop=
"isCargoControl"
>
<dict-selector
v-model=
"queryParams.isCargoControl"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
clearable
/>
<dict-selector
v-model=
"queryParams.isCargoControl"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('入仓类型')"
prop=
"warehouseType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model=
"queryParams.warehouseType"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model=
"queryParams.warehouseType"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
>
<user-selector
manage
v-model=
"queryParams.salesmanId"
clearable
@
change=
"handleQuery"
:prepend=
"
{ id: 0, nickname: $t('未分配客户经理')}"/>
<el-form-item
:label=
"$t('客户经理')"
>
<user-selector
manage
v-model=
"queryParams.salesmanId"
clearable
@
change=
"handleQuery"
:prepend=
"
{ id: 0, nickname: $t('未分配客户经理') }"
/>
</el-form-item>
<el-form-item
:label=
"$t('订单状态')"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.ORDER_STATUS"
v-model=
"queryParams.status"
@
keyup.enter.native=
"handleQuery"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ORDER_STATUS"
v-model=
"queryParams.status"
@
keyup.enter.native=
"handleQuery"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('报关方式')"
prop=
"customsType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
@
change=
"handleQuery"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('是否齐货')"
>
<el-form-item
:label=
"$t('是否齐货')"
>
<!--// 字段存疑-->
<dict-selector
v-model=
"queryParams.isNeat"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
clearable
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.isNeat"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('备案属性')"
prop=
"productRecord"
>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"queryParams.productRecord"
clearable
@
change=
"handleQuery"
/>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"queryParams.productRecord"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('快递单号')"
prop=
"number"
>
<el-input
v-model=
"queryParams.number"
:placeholder=
"$t('快递单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.number"
:placeholder=
"$t('快递单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('外部仓')"
prop=
"number"
>
<el-select
v-model=
"queryParams.isExternalWarehouse"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.isExternalWarehouse"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-option
:label=
"$t('外部仓')"
:value=
"1"
></el-option>
<el-option
:label=
"$t('自有仓')"
:value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('异常状态')"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.ORDER_ABNORMAL_STATE"
v-model=
"queryParams.abnormalState"
@
keyup.enter.native=
"handleQuery"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ORDER_ABNORMAL_STATE"
v-model=
"queryParams.abnormalState"
@
keyup.enter.native=
"handleQuery"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('审核状态')"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.ECW_ORDER_APPROVAL_TYPE"
v-model=
"queryParams.auditType"
@
keyup.enter.native=
"handleQuery"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ECW_ORDER_APPROVAL_TYPE"
v-model=
"queryParams.auditType"
@
keyup.enter.native=
"handleQuery"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('订单类型')"
prop=
"number"
>
<el-select
v-model=
"queryParams.type"
:placeholder=
"$t('请选择')"
clearable
>
<el-select
v-model=
"queryParams.type"
:placeholder=
"$t('请选择')"
clearable
>
<el-option
:label=
"$t('普通订单')"
:value=
"0"
></el-option>
<el-option
:label=
"$t('集运服务')"
:value=
"1"
></el-option>
<el-option
:label=
"$t('海外仓')"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"number"
>
<selector
:options=
"channelList"
:label-field=
"$l('name')"
value-field=
"channelId"
v-model=
"queryParams.channelId"
></selector>
<selector
:options=
"channelList"
:label-field=
"$l('name')"
value-field=
"channelId"
v-model=
"queryParams.channelId"
></selector>
</el-form-item>
<el-form-item
:label=
"$t('特需')"
prop=
"packageType"
>
<el-select
v-model=
"queryParams.packageTypeArr"
multiple
:placeholder=
"$t('请选择')"
clearable
>
<el-select
v-model=
"queryParams.packageTypeArr"
multiple
:placeholder=
"$t('请选择')"
clearable
>
<template
v-for=
"item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)"
>
<el-option
:label=
"$l(item, 'label')"
:value=
"item.value"
></el-option>
<el-option
:label=
"$l(item, 'label')"
:value=
"item.value"
></el-option>
</
template
>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{$t('搜索')}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{$t('重置')}}
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t("搜索")
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t("重置")
}}
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
:loading=
"exporting"
plain
size=
"mini"
@
click=
"exportXls(ids)"
v-hasPermi=
"['ecw:order:stockingList:export_selected']"
>
{{$t('导出所选')}}
</el-button>
<el-button
type=
"primary"
:loading=
"exporting"
plain
size=
"mini"
@
click=
"exportXls(queryParams)"
v-hasPermi=
"['ecw:order:stockingList:export_search']"
>
{{$t('导出搜索')}}
</el-button>
<el-button
:disabled=
"!multipleSelection.length"
type=
"primary"
:loading=
"exporting"
plain
size=
"mini"
@
click=
"exportXls(ids)"
v-hasPermi=
"['ecw:order:stockingList:export_selected']"
>
{{ $t("导出所选") }}
</el-button
>
<el-button
type=
"primary"
:loading=
"exporting"
plain
size=
"mini"
@
click=
"exportXls(queryParams)"
v-hasPermi=
"['ecw:order:stockingList:export_search']"
>
{{ $t("导出搜索") }}
</el-button
>
</el-col>
</el-row>
<!-- 列表 -->
<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"
align=
"center"
/>
<el-table-column
:label=
"$t('订单编号')"
width=
"120px"
align=
"center"
prop=
"orderNo"
>
<el-table-column
:label=
"$t('订单编号')"
width=
"120px"
align=
"center"
prop=
"orderNo"
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"
{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
<router-link
:to=
"
{
path: '/order/detail',
query: { orderId: scope.row.orderId },
}"
class="link-type"
>
<span>
{{
scope
.
row
.
orderNo
}}
</span>
</router-link>
<div
style=
"display: flex;flex-wrap: wrap;"
v-if=
"scope.row.advanceType"
>
<el-button
@
click=
"deleteSpecial(item.value,scope.row.orderId)"
size=
"mini"
style=
"margin-left: 20px"
type=
"danger"
circle
v-for=
"(item,index) in specialRendering(scope.row.advanceType)"
:key=
"index"
>
{{
item
.
label
[
0
]
}}
</el-button>
<div
style=
"display: flex; flex-wrap: wrap"
v-if=
"scope.row.advanceType"
>
<el-button
@
click=
"deleteSpecial(item.value, scope.row.orderId)"
size=
"mini"
style=
"margin-left: 20px"
type=
"danger"
circle
v-for=
"(item, index) in specialRendering(scope.row.advanceType)"
:key=
"index"
>
{{
item
.
label
[
0
]
}}
</el-button
>
</div>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('唛头')"
align=
"center"
prop=
"marks"
/>
<el-table-column
:label=
"$t('总箱数/入仓箱数')"
align=
"center"
prop=
"sumNum"
>
<
template
slot-scope=
"{row}"
>
<div
:style=
"
{color:row.customsType != 1 ? 'red' : null}">
{{
row
.
totalNum
}}{{
$t
(
'
箱
'
)
}}
/
{{
row
.
sumNum
}}{{
$t
(
'
箱
'
)
}}
</div>
<dict-tag
v-if=
"row.customsType != 1"
style=
"color:red"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
:value=
"row.customsType"
></dict-tag>
<el-table-column
:label=
"$t('总箱数/入仓箱数')"
align=
"center"
prop=
"sumNum"
>
<
template
slot-scope=
"{ row }"
>
<div
:style=
"
{ color: row.customsType != 1 ? 'red' : null }">
{{
row
.
totalNum
}}{{
$t
(
"
箱
"
)
}}
/
{{
row
.
sumNum
}}{{
$t
(
"
箱
"
)
}}
</div>
<dict-tag
v-if=
"row.customsType != 1"
style=
"color: red"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
:value=
"row.customsType"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('体积/重量')"
align=
"center"
prop=
"sumWeight"
>
<
template
slot-scope=
"{
row
}"
>
<
template
slot-scope=
"{
row
}"
>
<!--入仓前是填单数据,入仓后是入仓数据,装柜审核通过等状态inwarehouseState会变成0,所以只能通过sumNum来判断-->
<component
:is=
"row.orderType > 1 ? 'el-tooltip' : 'div'"
class=
"item"
:style=
"
{
color: row.orderType > 1 ? 'red' : null
color: row.orderType > 1 ? 'red' : null,
}"
effect="dark"
:content="row.orderType===2 ? (row.wvolume||0)+'m³' : (row.vweight || 0) + 'kg'"
placement="bottom">
<div
v-if=
"row.sumNum > 0"
>
{{
row
.
sumVolume
}}
m³ /
{{
row
.
sumWeight
}}
Kg
</div>
<div
v-else
>
{{
row
.
costVO
.
totalVolume
}}
m³ /
{{
row
.
costVO
.
totalWeight
}}
Kg
</div>
:content="
row.orderType === 2
? (row.wvolume || 0) + 'm³'
: (row.vweight || 0) + 'kg'
"
placement="bottom"
>
<div
v-if=
"row.sumNum > 0"
>
{{
row
.
sumVolume
}}
m³ /
{{
row
.
sumWeight
}}
Kg
</div>
<div
v-else
>
{{
row
.
costVO
.
totalVolume
}}
m³ /
{{
row
.
costVO
.
totalWeight
}}
Kg
</div>
</component>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('始发仓')"
align=
"center"
prop=
"startWarehouseName"
>
<
template
slot-scope=
"{row}"
>
{{
row
.
startWarehouseName
}}
<span
style=
"color:red"
v-if=
"row.isExternalWarehouse"
>
(
{{
$t
(
'
外部仓
'
)
}}
)
</span>
<el-table-column
:label=
"$t('始发仓')"
align=
"center"
prop=
"startWarehouseName"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
startWarehouseName
}}
<span
style=
"color: red"
v-if=
"row.isExternalWarehouse"
>
(
{{
$t
(
"
外部仓
"
)
}}
)
</span
>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('运输方式/目的地')"
align=
"center"
prop=
"transportId"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"row.transportId"
/>
/
{{
row
.
dstWarehouseName
}}
<el-table-column
:label=
"$t('运输方式/目的地')"
align=
"center"
prop=
"transportId"
>
<
template
slot-scope=
"{ row }"
>
<dict-tag
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
:value=
"row.transportId"
/>
/
{{
row
.
dstWarehouseName
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('控货')"
align=
"center"
prop=
"isCargoControl"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"row.isCargoControl"
/>
<
template
slot-scope=
"{ row }"
>
<dict-tag
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
:value=
"row.isCargoControl"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('订单状态')"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<!--
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.status"
/>
-->
{{
scope
.
row
.
statusMsg
}}
{{
scope
.
row
.
statusMsg
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width actions"
width=
"150px"
>
<el-table-column
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width actions"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"setCanNotShipment(scope.row)"
v-hasPermi=
"['ecw:order:setCanNotShipment']"
>
{{
$t
(
'
不可出
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"$router.push('stocking?id=' + scope.row.orderId)"
v-hasPermi=
"['ecw:order:stockingList:stocking']"
>
{{
$t
(
'
备货
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"printTagOrderId=scope.row.orderId"
v-hasPermi=
"['ecw:order:stockingList:print_tag']"
>
{{
$t
(
'
打印标签
'
)
}}
</el-button>
<el-button
type=
"text"
@
click=
"setCanNotShipment(scope.row)"
v-hasPermi=
"['ecw:order:setCanNotShipment']"
>
{{
$t
(
"
不可出
"
)
}}
</el-button
>
<el-button
type=
"text"
@
click=
"$router.push('stocking?id=' + scope.row.orderId)"
v-hasPermi=
"['ecw:order:stockingList:stocking']"
>
{{
$t
(
"
备货
"
)
}}
</el-button
>
<el-button
type=
"text"
@
click=
"printTagOrderId = scope.row.orderId"
v-hasPermi=
"['ecw:order:stockingList:print_tag']"
>
{{
$t
(
"
打印标签
"
)
}}
</el-button
>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<print-tag
v-if=
"printTagOrderId !== null"
:order-id=
"printTagOrderId"
@
close=
"printTagOrderId=null"
/>
<print-tag
v-if=
"printTagOrderId !== null"
:order-id=
"printTagOrderId"
@
close=
"printTagOrderId = null"
/>
</div>
</template>
<
script
>
import
Selector
from
'
@/components/Selector
'
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
import
CustomerSelector
from
'
@/components/CustomerSelector
'
import
specialNeeds
from
'
@/views/ecw/order/components/specialNeeds
'
;
import
Selector
from
"
@/components/Selector
"
;
import
ProductSelector
from
"
@/components/ProductSelector
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
CustomerSelector
from
"
@/components/CustomerSelector
"
;
import
specialNeeds
from
"
@/views/ecw/order/components/specialNeeds
"
;
import
{
canReadyStockShipmentPage
,
exportReadyStock
,
canShipmentPage
,
orderSpecialNeed
,
exportCanShipment
,
setNotCanShipment
,
setCanNotShipment
exportCanShipment
,
setNotCanShipment
,
setCanNotShipment
,
}
from
"
@/api/ecw/order
"
;
import
PrintTag
from
'
./components/PrintTag
'
import
PrintWarehouseReceipt
from
'
./components/PrintWarehouseReceipt
'
import
PrintLadingBill
from
'
./components/PrintLadingBill
'
import
BatchPickup
from
'
./components/BatchPickup
'
import
PrintTag
from
"
./components/PrintTag
"
;
import
PrintWarehouseReceipt
from
"
./components/PrintWarehouseReceipt
"
;
import
PrintLadingBill
from
"
./components/PrintLadingBill
"
;
import
BatchPickup
from
"
./components/BatchPickup
"
;
import
withdrawal
from
"
@/views/ecw/order/withdrawal
"
;
import
UserSelector
from
'
@/components/UserSelector
'
import
UserSelector
from
"
@/components/UserSelector
"
;
import
BatchSingleApplication
from
"
@/views/ecw/order/batchSingleApplication
"
;
import
FeeApplication
from
"
@/views/ecw/order/feeApplication
"
;
import
MergeLog
from
'
@/views/ecw/order/components/MergeLog
'
import
PickupLog
from
'
./components/PickupLog
'
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
MergeLog
from
"
@/views/ecw/order/components/MergeLog
"
;
import
PickupLog
from
"
./components/PickupLog
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getCurrencyPage
}
from
"
@/api/ecw/currency
"
;
import
SplitRevoke
from
"
@/views/ecw/order/components/SplitRevoke
"
;
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
;
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
;
import
Template
from
"
@/views/cms/template/index.vue
"
;
export
default
{
name
:
"
EcwOrderStockinglist
"
,
...
...
@@ -233,7 +466,15 @@ export default {
MergeLog
,
PickupLog
,
SplitRevoke
,
CustomerSelector
,
ProductSelector
,
Selector
,
specialNeeds
,
PrintTag
,
PrintWarehouseReceipt
,
PrintLadingBill
,
BatchPickup
,
withdrawal
CustomerSelector
,
ProductSelector
,
Selector
,
specialNeeds
,
PrintTag
,
PrintWarehouseReceipt
,
PrintLadingBill
,
BatchPickup
,
withdrawal
,
},
data
()
{
return
{
...
...
@@ -255,78 +496,84 @@ export default {
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
rows
:
10
,
},
warehouseList
:[],
warehouseList
:
[],
productAttrList
:
[],
// 商品属性
molecule
:
''
,
//重货比分子
denominator
:
''
,
//重货比分母
dateFilterType
:
''
,
//日期筛选类别
molecule
:
""
,
//重货比分子
denominator
:
""
,
//重货比分母
dateFilterType
:
""
,
//日期筛选类别
dateFilter
:
[],
//筛选日期
printTagOrderId
:
null
,
// 显示打印标签的订单ID
isShow
:
false
,
//特殊显示
multipleSelection
:[],
isShow
:
false
,
//特殊显示
multipleSelection
:
[],
params
:
{
page
:
1
,
rows
:
20
,
},
currencyList
:[],
channelList
:
[]
currencyList
:
[],
channelList
:
[],
};
},
watch
:{
isChinese
(){
this
.
getList
()
}
watch
:
{
isChinese
()
{
this
.
getList
()
;
}
,
},
computed
:
{
isChinese
(){
return
this
.
$i18n
.
locale
===
'
zh_CN
'
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
},
exportWarehouseList
(){
exportWarehouseList
()
{
/* tradeType 1 进口,2出口,3进出口 */
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
2
||
item
.
tradeType
==
3
)
return
this
.
warehouseList
.
filter
(
(
item
)
=>
item
.
tradeType
==
2
||
item
.
tradeType
==
3
);
},
importWarehouseList
(){
return
this
.
warehouseList
.
filter
(
item
=>
item
.
tradeType
==
1
||
item
.
tradeType
==
3
)
importWarehouseList
()
{
return
this
.
warehouseList
.
filter
(
(
item
)
=>
item
.
tradeType
==
1
||
item
.
tradeType
==
3
);
},
combinedQueryParams
(){
let
timeParams
=
{}
if
(
this
.
dateFilterType
&&
this
.
dateFilter
)
{
timeParams
[
'
begin
'
+
this
.
dateFilterType
]
=
this
.
dateFilter
[
0
]
timeParams
[
'
end
'
+
this
.
dateFilterType
]
=
this
.
dateFilter
[
1
]
combinedQueryParams
()
{
let
timeParams
=
{};
if
(
this
.
dateFilterType
&&
this
.
dateFilter
)
{
timeParams
[
"
begin
"
+
this
.
dateFilterType
]
=
this
.
dateFilter
[
0
];
timeParams
[
"
end
"
+
this
.
dateFilterType
]
=
this
.
dateFilter
[
1
];
}
let
queryParams
=
Object
.
assign
({},
this
.
queryParams
,
timeParams
)
return
queryParams
let
queryParams
=
Object
.
assign
({},
this
.
queryParams
,
timeParams
);
return
queryParams
;
},
},
activated
(){
this
.
getList
()
activated
()
{
this
.
getList
()
;
},
created
()
{
this
.
getList
();
getProductAttrList
().
then
(
res
=>
this
.
productAttrList
=
res
.
data
)
getWarehouseList
().
then
(
res
=>
this
.
warehouseList
=
res
.
data
)
getProductAttrList
().
then
(
(
res
)
=>
(
this
.
productAttrList
=
res
.
data
));
getWarehouseList
().
then
(
(
res
)
=>
(
this
.
warehouseList
=
res
.
data
));
getCurrencyPage
(
this
.
params
).
then
(
res
=>
this
.
currencyList
=
res
.
data
.
list
)
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
getCurrencyPage
(
this
.
params
).
then
(
(
res
)
=>
(
this
.
currencyList
=
res
.
data
.
list
)
);
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
));
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
const
query
=
{
...
this
.
combinedQueryParams
}
if
(
query
.
packageTypeArr
&&
query
.
packageTypeArr
.
length
)
{
query
.
packageType
=
query
.
packageTypeArr
.
join
(
'
,
'
)
const
query
=
{
...
this
.
combinedQueryParams
};
if
(
query
.
packageTypeArr
&&
query
.
packageTypeArr
.
length
)
{
query
.
packageType
=
query
.
packageTypeArr
.
join
(
"
,
"
);
}
// 执行查询
canShipmentPage
(
query
).
then
(
response
=>
{
canShipmentPage
(
query
).
then
(
(
response
)
=>
{
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this
.
list
=
[]
this
.
list
=
[]
;
this
.
$nextTick
(()
=>
{
this
.
list
=
response
.
data
.
list
})
this
.
list
=
response
.
data
.
list
;
})
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
...
...
@@ -334,79 +581,94 @@ export default {
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
;
this
.
$nextTick
(
this
.
getList
)
this
.
$nextTick
(
this
.
getList
)
;
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
page
:
1
,
rows
:
10
}
this
.
dateFilter
=
[]
rows
:
10
,
}
;
this
.
dateFilter
=
[]
;
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
$router
.
push
(
'
create
'
)
this
.
$router
.
push
(
"
create
"
);
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
$router
.
push
(
'
edit?id=
'
+
row
.
orderId
)
this
.
$router
.
push
(
"
edit?id=
"
+
row
.
orderId
);
},
// 表格多选
handleSelectionChange
(
selection
)
{
this
.
multipleSelection
=
selection
this
.
ids
=
selection
.
map
(
item
=>
item
.
orderId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multipleSelection
=
selection
;
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
orderId
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
// 导出
exportXls
(
params
){
this
.
exporting
=
true
const
exportParams
=
Array
.
isArray
(
params
)
?
{
orderIdList
:
params
}
:
{...
params
}
exportCanShipment
(
exportParams
).
then
(
res
=>
{
exportXls
(
params
)
{
this
.
exporting
=
true
;
const
exportParams
=
Array
.
isArray
(
params
)
?
{
orderIdList
:
params
}
:
{
...
params
};
exportCanShipment
(
exportParams
)
.
then
((
res
)
=>
{
// this.$download.excel(res, this.$t('备货订单') + '.xls');
this
.
$message
.
success
(
this
.
$t
(
'
已加入导出队列,请稍后在下载日志中下载
'
))
}).
finally
(()
=>
{
this
.
exporting
=
false
this
.
$message
.
success
(
this
.
$t
(
"
已加入导出队列,请稍后在下载日志中下载
"
)
);
})
.
finally
(()
=>
{
this
.
exporting
=
false
;
});
},
// 特需标识处理
specialRendering
(
val
){
console
.
log
(
'
val
'
,
val
)
if
(
val
!==
undefined
){
let
i
=
val
.
split
(
'
,
'
)
return
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ORDER_SPECIAL_NEEDS
).
filter
(
e
=>
{
return
i
.
indexOf
(
e
.
value
)
>
-
1
}).
map
(
item
=>
{
// 打字开头的用最后一个字,否则取第一个字
item
.
symbol
=
item
.
label
[
0
]
==
'
打
'
?
item
.
label
[
item
.
label
.
length
-
1
]:
item
.
label
[
0
]
return
item
specialRendering
(
val
)
{
console
.
log
(
"
val
"
,
val
);
if
(
val
!==
undefined
)
{
let
i
=
val
.
split
(
"
,
"
);
return
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ORDER_SPECIAL_NEEDS
)
.
filter
((
e
)
=>
{
return
i
.
indexOf
(
e
.
value
)
>
-
1
;
})
.
map
((
item
)
=>
{
// 打字开头的用最后一个字,否则取第一个字
item
.
symbol
=
item
.
label
[
0
]
==
"
打
"
?
item
.
label
[
item
.
label
.
length
-
1
]
:
item
.
label
[
0
];
return
item
;
});
}
},
// 删除特需
deleteSpecial
(
id
,
orderId
){
this
.
$confirm
(
this
.
$t
(
'
确定删除此特需么?
'
)).
then
(()
=>
{
return
orderSpecialNeed
({
orderId
:
orderId
,
advanceType
:
id
})
}).
then
(()
=>
{
this
.
getList
()
deleteSpecial
(
id
,
orderId
)
{
this
.
$confirm
(
this
.
$t
(
"
确定删除此特需么?
"
))
.
then
(()
=>
{
return
orderSpecialNeed
({
orderId
:
orderId
,
advanceType
:
id
});
})
.
then
(()
=>
{
this
.
getList
();
});
},
// 设置空运订单不可出
async
setCanNotShipment
(
order
){
await
this
.
$confirm
(
this
.
$t
(
"
确定设置订单{orderNo}不可出么?
"
,
{
orderNo
:
order
.
orderNo
}))
setCanNotShipment
(
order
.
orderId
).
then
(
res
=>
{
this
.
$message
(
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
})
}
}
async
setCanNotShipment
(
order
)
{
await
this
.
$confirm
(
this
.
$t
(
"
确定设置订单{orderNo}不可出么?
"
,
{
orderNo
:
order
.
orderNo
})
);
setCanNotShipment
(
order
.
orderId
).
then
((
res
)
=>
{
this
.
$message
(
this
.
$t
(
"
操作成功
"
));
this
.
getList
();
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
::v-deep
.actions
{
.el-dropdown
{
::v-deep
.actions
{
.el-dropdown
{
margin-right
:
10px
;
&
:last-child
{
margin-right
:
0
;
...
...
src/views/ecw/productPrice/edit.vue
View file @
b503e130
...
...
@@ -353,6 +353,7 @@
</el-form-item>
</
template
>
<!--是否单询价,lanbm 2024-06-17 添加海运选中单询价不用设置价格信息逻辑 -->
<el-form-item
:label=
"$t('是否单询')"
prop=
"inquiry"
>
<dict-selector
:type=
"DICT_TYPE.NEED_ORDER_INQUIRY"
...
...
@@ -361,6 +362,7 @@
formatter=
"number"
></dict-selector>
</el-form-item>
<!--end 是否单询价,lanbm 2024-06-17 添加海运选中单询价不用设置价格信息逻辑 -->
</el-card>
</el-form>
...
...
@@ -931,12 +933,12 @@ export default {
if
(
!
valid
)
{
return
;
}
// 只有修改单条路线的时候,不需要选择路线
/* if (this.$route.query.action !== 'update' && (!this.selectedRoutes || !this.selectedRoutes.length)) {
this.$message.error('请选择线路');
return;
} */
if
(
!
this
.
lineList
.
length
&&
(
!
this
.
selectedRoutes
||
!
this
.
selectedRoutes
.
length
)
...
...
@@ -949,6 +951,9 @@ export default {
// specialList: this.specialProducts,
isAllProduct
:
0
,
});
if
(
this
.
form
.
needOrderInquiry
==
0
)
{
//不是单询价才校验价格参数 lanbm 2024-06-17 add
// 阶梯价
if
(
this
.
form
.
stepPrice
)
{
let
isValid
=
true
;
...
...
@@ -1036,6 +1041,8 @@ export default {
}
}
}
// 修改单条路线
if
(
this
.
$route
.
query
.
action
==
"
update
"
)
{
this
.
loading
=
true
;
...
...
src/views/ecw/productPrice/index.vue
View file @
b503e130
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
+
$t
(
'
路线价格列表
'
)
:
routeName
}}
</div>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
"
-
"
+
$t
(
"
路线价格列表
"
)
:
routeName
}}
</div>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
:label=
"$t('商品名称')"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('请输入中英文名称、商品编码、海关编码')"
clearable
@
keyup.enter.native=
"handleQuery"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
:label=
"$t('商品名称')"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('请输入中英文名称、商品编码、海关编码')"
clearable
@
keyup.enter.native=
"handleQuery"
>
<template
#prepend
>
<el-select
v-model=
"queryParams.searchType"
style=
"width: 100px"
>
<el-option
:value=
"1"
:label=
"$t('包含')"
></el-option>
...
...
@@ -15,67 +37,196 @@
</el-input>
</el-form-item>
<el-form-item
:label=
"$t('商品类型')"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.typeId"
:placeholder=
"$t('选择商品类型')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"$l(type, 'titleZh')"
:value=
"type.id"
/>
<el-form-item
:label=
"$t('商品类型')"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.typeId"
:placeholder=
"$t('选择商品类型')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"$l(type, 'titleZh')"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('商品属性')"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.attrId"
:placeholder=
"$t('选择商品类型')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"$l(attr, 'attrName')"
:value=
"attr.id"
/>
<el-form-item
:label=
"$t('商品属性')"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.attrId"
:placeholder=
"$t('选择商品类型')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"$l(attr, 'attrName')"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
v-if=
"!transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
@
change=
"handleQuery"
/>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
v-if=
"!transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<!--海运不显示渠道-->
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
v-if=
"type !== 'sea'"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannelId"
v-if=
"type !== 'sea'"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('始发地')"
prop=
"startCityId"
>
<el-select
v-model=
"queryParams.startCityId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"$l(city, 'title')"
:value=
"city.id"
/>
<el-select
v-model=
"queryParams.startCityId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"$l(city, 'title')"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<!--lanbm 2024-06-15 add -->
<el-form-item
:label=
"$t('目的国')"
prop=
"countryId"
>
<el-select
v-model=
"queryParams.countryId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in countryList"
:key=
"item.id"
:label=
"$l(item, 'title')"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的地')"
prop=
"destCityId"
>
<el-select
v-model=
"queryParams.destCityId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"$l(city, 'title')"
:value=
"city.id"
/>
<el-select
v-model=
"queryParams.destCityId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"$l(city, 'title')"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<!--lanbm 2024-06-15 add-->
<el-form-item
:label=
"$t('目的仓')"
prop=
"destCityId"
>
<el-select
v-model=
"queryParams.destCityId"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"$l(city, 'title')"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('是否预付')"
prop=
"needPay"
>
<el-select
v-model=
"queryParams.needPay"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.needPay"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-option
:label=
"$t('是')"
value=
"1"
></el-option>
<el-option
:label=
"$t('否')"
value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('上架状态')"
prop=
"auditStatus"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_AUDIT_STATUS"
v-model=
"queryParams.auditStatus"
clearable
@
change=
"handleQuery"
/>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_AUDIT_STATUS"
v-model=
"queryParams.auditStatus"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
prop=
"combStatus"
>
<el-select
v-model=
"queryParams.combStatus"
:placeholder=
"$t('请选择状态')"
clearable
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.combStatus"
:placeholder=
"$t('请选择状态')"
clearable
@
change=
"handleQuery"
>
<el-option
:label=
"$t('未设置价格')"
value=
"setPrice_1"
></el-option>
<el-option
:label=
"$t('未过期')"
value=
"setPrice_2"
></el-option>
<el-option
:label=
"$t('黑名单')"
value=
"blacklist_1"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('是否单询')"
prop=
"needOrderInquiry"
>
<el-select
v-model=
"queryParams.needOrderInquiry"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.needOrderInquiry"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-option
:label=
"$t('是')"
value=
"1"
></el-option>
<el-option
:label=
"$t('否')"
value=
"0"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('单价模式')"
prop=
"priceType"
>
<el-select
v-model=
"queryParams.priceType"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-select
v-model=
"queryParams.priceType"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-option
:label=
"$t('运费+清关费')"
value=
"0"
></el-option>
<el-option
:label=
"$t('全包价')"
value=
"1"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{$t('搜索')}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{$t('重置')}}
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t("搜索")
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t("重置")
}}
</el-button>
</el-form-item>
</el-form>
...
...
@@ -83,80 +234,192 @@
<el-row
:gutter=
"10"
class=
"mb8"
>
<!--全部路线吗没有新增入口,指定商品的路线价格才有添加路线-->
<el-col
:span=
"1.5"
v-if=
"$route.query.product_id"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd('air')"
v-hasPermi=
"['ecw:product-price:create']"
>
{{$t('新建空运价格')}}
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd('sea')"
v-hasPermi=
"['ecw:product-price:create']"
>
{{$t('新建海运价格')}}
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd('air')"
v-hasPermi=
"['ecw:product-price:create']"
>
{{ $t("新建空运价格") }}
</el-button
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd('sea')"
v-hasPermi=
"['ecw:product-price:create']"
>
{{ $t("新建海运价格") }}
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<!--未指定商品-->
<
template
v-if=
"!$route.query.product_id"
>
<!--
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit"
>
{{
$t
(
'
批量设置价格
'
)
}}
</el-button>
-->
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:bartch_black']"
size=
"mini"
@
click=
"batchBlock"
:disabled=
"multiple"
>
{{
$t
(
'
批量加入黑名单
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_down']"
size=
"mini"
@
click=
"batchOff"
:disabled=
"multiple"
>
{{
$t
(
'
批量下架
'
)
}}
</el-button>
<el-button
type=
"warning"
v-hasPermi=
"['ecw:product-price:export']"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"primary"
v-if=
"type != 'air'"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('sea')"
>
{{
$t
(
'
批量设置海运价格
'
)
}}
</el-button>
<el-button
type=
"primary"
v-if=
"type != 'sea'"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('air')"
>
{{
$t
(
'
批量设置空运价格
'
)
}}
</el-button>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:bartch_black']"
size=
"mini"
@
click=
"batchBlock"
:disabled=
"multiple"
>
{{
$t
(
"
批量加入黑名单
"
)
}}
</el-button
>
<el-button
type=
"primary"
v-hasPermi=
"['ecw:product-price:batch_down']"
size=
"mini"
@
click=
"batchOff"
:disabled=
"multiple"
>
{{
$t
(
"
批量下架
"
)
}}
</el-button
>
<el-button
type=
"warning"
v-hasPermi=
"['ecw:product-price:export']"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
"
导出
"
)
}}
</el-button
>
<el-button
type=
"primary"
v-if=
"type != 'air'"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('sea')"
>
{{
$t
(
"
批量设置海运价格
"
)
}}
</el-button
>
<el-button
type=
"primary"
v-if=
"type != 'sea'"
v-hasPermi=
"['ecw:product-price:batch_update']"
size=
"mini"
@
click=
"handleBatchEdit('air')"
>
{{
$t
(
"
批量设置空运价格
"
)
}}
</el-button
>
</
template
>
<!--指定商品-->
<
template
v-else
>
<el-button
type=
"primary"
size=
"mini"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice('sea')"
>
{{
$t
(
'
批量设置商品海运路线
'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice('air')"
>
{{
$t
(
'
批量设置商品空运路线
'
)
}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice('sea')"
>
{{
$t
(
"
批量设置商品海运路线
"
)
}}
</el-button
>
<el-button
type=
"primary"
size=
"mini"
v-hasPermi=
"['ecw:product-price:single_product']"
@
click=
"batchSetSingleProductPrice('air')"
>
{{
$t
(
"
批量设置商品空运路线
"
)
}}
</el-button
>
</
template
>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
></el-table-column>
<el-table-column
:label=
"$t('序号')"
prop=
"id"
width=
"50"
/>
<el-table-column
:label=
"$t('商品编码')"
align=
"center"
prop=
"productCode"
>
<
template
slot-scope=
"{row}"
>
<el-table-column
:label=
"$t('商品编码')"
align=
"center"
prop=
"productCode"
>
<
template
slot-scope=
"{ row }"
>
<el-link
type=
"primary"
@
click.native=
"handleUpdate(row)"
>
{{
row
.
productDO
?
row
.
productDO
.
productCode
:
$t
(
'
无productDO字段
'
)
}}
{{
row
.
productDO
?
row
.
productDO
.
productCode
:
$t
(
"
无productDO字段
"
)
}}
</el-link>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('海关编码')"
align=
"center"
prop=
"customsCode"
>
<
template
slot-scope=
"{row}"
>
<el-table-column
:label=
"$t('海关编码')"
align=
"center"
prop=
"customsCode"
>
<
template
slot-scope=
"{ row }"
>
<div>
{{
row
.
productDO
?
row
.
productDO
.
customsCode
:
$t
(
'
无productDO字段
'
)
}}
{{
row
.
productDO
?
row
.
productDO
.
customsCode
:
$t
(
"
无productDO字段
"
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品类型')"
align=
"center"
prop=
"typeId"
>
<
template
slot-scope=
"{row}"
>
<span>
{{
row
.
productDO
?
getTypeName
(
row
.
productDO
.
typeId
)
:
$t
(
'
无productDO字段
'
)
}}
</span>
<
template
slot-scope=
"{ row }"
>
<span>
{{
row
.
productDO
?
getTypeName
(
row
.
productDO
.
typeId
)
:
$t
(
"
无productDO字段
"
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('商品名称')"
align=
"center"
prop=
"productName"
>
<
template
slot-scope=
"{row}"
>
<el-table-column
:label=
"$t('商品名称')"
align=
"center"
prop=
"productName"
>
<
template
slot-scope=
"{ row }"
>
<el-link
type=
"primary"
@
click.native=
"handleUpdate(row)"
>
{{
row
.
productDO
?
row
.
productDO
.
titleZh
+
'
/
'
+
row
.
productDO
.
titleEn
:
$t
(
'
无productDO字段
'
)
}}
{{
row
.
productDO
?
row
.
productDO
.
titleZh
+
"
/
"
+
row
.
productDO
.
titleEn
:
$t
(
"
无productDO字段
"
)
}}
</el-link>
</
template
>
</el-table-column>
<el-table-column
prop=
"tansportType"
:label=
"$t('运输方式')"
align=
"center"
width=
"100"
>
<el-table-column
prop=
"tansportType"
:label=
"$t('运输方式')"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<div>
{{
transportName
(
scope
.
row
.
warehouseLineDO
.
transportType
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"tansportType"
:label=
"$t('出货渠道')"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"{row}"
>
<el-table-column
prop=
"tansportType"
:label=
"$t('出货渠道')"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"{ row }"
>
<div>
{{
channelName
(
row
.
shippingChannelId
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"startDestTitle"
:label=
"$t('始发地') + '/' + $t('目的地')"
align=
"center"
>
<el-table-column
prop=
"startDestTitle"
:label=
"$t('始发地') + '/' + $t('目的地')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
warehouseLineDO
.
startTitleZh
}}
...
...
@@ -168,55 +431,126 @@
<el-table-column
prop=
"price"
:label=
"$t('价格')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.needOrderInquiry==1"
>
<div
v-if=
"scope.row.needOrderInquiry==1"
>
{{
$t
(
'
单询无价格,请联系市场部
'
)
}}
</div>
<template
v-if=
"scope.row.needOrderInquiry == 1"
>
<div
v-if=
"scope.row.needOrderInquiry == 1"
>
{{
$t
(
"
单询无价格,请联系市场部
"
)
}}
</div>
</
template
>
<
template
v-else
>
<template
v-if=
"scope.row.stepPrice == 1"
>
<!--全包价-->
<div
v-if=
"scope.row.priceType"
>
<div
v-if=
"!scope.row.fullPriceStepList || !scope.row.fullPriceStepList.length"
>
{{
$t
(
'
未设置全包价阶梯价
'
)
}}
</div>
<div
v-if=
"
!scope.row.fullPriceStepList ||
!scope.row.fullPriceStepList.length
"
>
{{
$t
(
"
未设置全包价阶梯价
"
)
}}
</div>
<div
v-else
>
{{
$t
(
"
第{no
}
阶梯({start
}
~{end
}
{weightUnit
}
)
"
,
{
{{
$t
(
"
第{no
}
阶梯({start
}
~{end
}
{weightUnit
}
)
"
,
{
no
:
1
,
start
:
scope
.
row
.
fullPriceStepList
[
0
].
startNum
,
end
:
scope
.
row
.
fullPriceStepList
[
0
].
endNum
,
weightUnit
:
getUnitTitle
(
scope
.
row
.
fullPriceStepList
[
0
].
weightUnit
),
}
)
}}
<
br
/>
{{
$t
(
'
全包价
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
fullPriceStepList
[
0
].
allPriceUnit
)
+
scope
.
row
.
fullPriceStepList
[
0
].
allPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
fullPriceStepList
[
0
].
allPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
fullPriceStepList
[
0
].
allVolumeUnit
)
}}
weightUnit
:
getUnitTitle
(
scope
.
row
.
fullPriceStepList
[
0
].
weightUnit
),
}
)
}}
<
br
/>
{{
$t
(
"
全包价
"
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
fullPriceStepList
[
0
].
allPriceUnit
)
+
scope
.
row
.
fullPriceStepList
[
0
].
allPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
fullPriceStepList
[
0
].
allPriceUnit
)
+
"
/
"
+
getUnitTitle
(
scope
.
row
.
fullPriceStepList
[
0
].
allVolumeUnit
)
}}
<
/div
>
<
/div
>
<
template
v
-
else
>
<
div
v
-
if
=
"
!scope.row.freightPriceStepList || !scope.row.freightPriceStepList.length
"
>
{{
$t
(
'
未设置运费阶梯价
'
)
}}
<
/div
>
<
div
v
-
if
=
"
!scope.row.freightPriceStepList ||
!scope.row.freightPriceStepList.length
"
>
{{
$t
(
"
未设置运费阶梯价
"
)
}}
<
/div
>
<
div
v
-
else
>
{{
$t
(
"
第{no
}
阶梯({start
}
~{end
}
{weightUnit
}
)
"
,
{
{{
$t
(
"
第{no
}
阶梯({start
}
~{end
}
{weightUnit
}
)
"
,
{
no
:
1
,
start
:
scope
.
row
.
freightPriceStepList
[
0
].
startNum
,
end
:
scope
.
row
.
freightPriceStepList
[
0
].
endNum
,
weightUnit
:
getUnitTitle
(
scope
.
row
.
freightPriceStepList
[
0
].
weightUnit
),
}
)
}}
<
br
/>
weightUnit
:
getUnitTitle
(
scope
.
row
.
freightPriceStepList
[
0
].
weightUnit
),
}
)
}}
<
br
/>
<
div
>
{{
$t
(
'
运费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
freightPriceStepList
[
0
].
transportPriceUnit
)
+
scope
.
row
.
freightPriceStepList
[
0
].
transportPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
freightPriceStepList
[
0
].
transportPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
freightPriceStepList
[
0
].
transportVolumeUnit
)
}}
{{
$t
(
"
运费
"
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
freightPriceStepList
[
0
].
transportPriceUnit
)
+
scope
.
row
.
freightPriceStepList
[
0
].
transportPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
freightPriceStepList
[
0
].
transportPriceUnit
)
+
"
/
"
+
getUnitTitle
(
scope
.
row
.
freightPriceStepList
[
0
].
transportVolumeUnit
)
}}
<
/div
>
<
/div
>
<
/template
>
<
el
-
button
type
=
"
text
"
@
click
=
"
showMoreStepPriceItem=scope.row
"
>
{{
$t
(
'
查看更多
'
)
}}
<
/el-button
>
<
el
-
button
type
=
"
text
"
@
click
=
"
showMoreStepPriceItem = scope.row
"
>
{{
$t
(
"
查看更多
"
)
}}
<
/el-butto
n
>
<
/template
>
<
template
v
-
else
>
<
div
v
-
if
=
"
scope.row.priceType == 0
"
>
{{
$t
(
'
运费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
transportPriceUnit
)
+
scope
.
row
.
transportPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
transportPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
transportVolumeUnit
)
}}
{{
$t
(
"
运费
"
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
transportPriceUnit
)
+
scope
.
row
.
transportPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
transportPriceUnit
)
+
"
/
"
+
getUnitTitle
(
scope
.
row
.
transportVolumeUnit
)
}}
<
br
/>
{{
$t
(
'
清关费
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
clearancePriceUnit
)
+
scope
.
row
.
clearancePrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
clearancePriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
clearanceVolumeUnit
)
}}
{{
$t
(
"
清关费
"
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
clearancePriceUnit
)
+
scope
.
row
.
clearancePrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
clearancePriceUnit
)
+
"
/
"
+
getUnitTitle
(
scope
.
row
.
clearanceVolumeUnit
)
}}
<
/div
>
<
div
v
-
if
=
"
scope.row.priceType == 1
"
>
{{
$t
(
'
全包价
'
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
allPriceUnit
)
+
scope
.
row
.
allPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
allPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
allVolumeUnit
)
}}
{{
$t
(
"
全包价
"
)
}}
:{{
getCurrencySymbol
(
scope
.
row
.
allPriceUnit
)
+
scope
.
row
.
allPrice
}}
&
nbsp
;
{{
getCurrencyTitle
(
scope
.
row
.
allPriceUnit
)
+
"
/
"
+
getUnitTitle
(
scope
.
row
.
allVolumeUnit
)
}}
<
/div
>
<
/template
>
<
/template
>
...
...
@@ -267,98 +601,203 @@
{{
getCurrencyTitle
(
scope
.
row
.
allPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
allVolumeUnit
)
}}
<
/div
>
<
/template> --
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
auditStatus
"
align
=
"
center
"
:
label
=
"
$t('状态')
"
width
=
"
120
"
>
<
el
-
table
-
column
prop
=
"
auditStatus
"
align
=
"
center
"
:
label
=
"
$t('状态')
"
width
=
"
120
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
>
{{
statusName
(
scope
.
row
)
}}
<
span
style
=
"
color:red
"
v
-
if
=
"
(scope.row.validateStartDate && scope.row.validateStartDate > Date.now()) || (scope.row.validateEndDate && scope.row.validateEndDate < Date.now())
"
>
(
已过期
)
<
/span
>
<
span
style
=
"
color: red
"
v
-
if
=
"
(scope.row.validateStartDate &&
scope.row.validateStartDate > Date.now()) ||
(scope.row.validateEndDate &&
scope.row.validateEndDate < Date.now())
"
>
(
已过期
)
<
/spa
n
>
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('单询')
"
align
=
"
center
"
width
=
"
80
"
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('单询')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
:
value
=
"
scope.row.needOrderInquiry
"
><
/dict-tag
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.NEED_ORDER_INQUIRY
"
:
value
=
"
scope.row.needOrderInquiry
"
><
/dict-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('预付')
"
align
=
"
center
"
width
=
"
80
"
>
<
el
-
table
-
column
prop
=
"
advanceStatus
"
:
label
=
"
$t('预付')
"
align
=
"
center
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
>
<!--
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
-->
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_PAY_ADVANCE
"
:
value
=
"
scope.row.needPay
"
><
/dict-tag
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_PAY_ADVANCE
"
:
value
=
"
scope.row.needPay
"
><
/dict-tag
>
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('最后修改时间')
"
>
<
template
slot
-
scope
=
"
{
row
}
"
>
<
template
slot
-
scope
=
"
{
row
}
"
>
<
div
>
{{
row
.
updateTime
|
parseTime
}}
{{
row
.
updateTime
|
parseTime
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('操作')
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
width
=
"
140
"
>
<
el
-
table
-
column
:
label
=
"
$t('操作')
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
width
=
"
140
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleUpdate(scope.row, true)
"
v
-
hasPermi
=
"
['ecw:product-price:show']
"
>
{{
$t
(
'
查看
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleUpdate(scope.row)
"
v
-
hasPermi
=
"
['ecw:product-price:update']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateStatus(scope.row, 'blacklist')
"
v
-
hasPermi
=
"
['ecw:product-price:black']
"
>
{{
scope
.
row
.
blacklist
==
0
?
$t
(
'
加入黑名单
'
)
:
$t
(
'
移除黑名单
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateStatus(scope.row, 'auditStatus')
"
v
-
hasPermi
=
"
['ecw:product-price:down']
"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
$t
(
'
下架
'
)
:
$t
(
'
上架
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['ecw:product-price:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
copyTemplate(scope.row)
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
复制模板
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 0)
"
v
-
if
=
"
scope.row.needOrderInquiry
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
取消单询
'
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 1)
"
v
-
else
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
'
单询异常
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleUpdate(scope.row, true)
"
v
-
hasPermi
=
"
['ecw:product-price:show']
"
>
{{
$t
(
"
查看
"
)
}}
<
/el-butto
n
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleUpdate(scope.row)
"
v
-
hasPermi
=
"
['ecw:product-price:update']
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-butto
n
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateStatus(scope.row, 'blacklist')
"
v
-
hasPermi
=
"
['ecw:product-price:black']
"
>
{{
scope
.
row
.
blacklist
==
0
?
$t
(
"
加入黑名单
"
)
:
$t
(
"
移除黑名单
"
)
}}
<
/el-butto
n
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateStatus(scope.row, 'auditStatus')
"
v
-
hasPermi
=
"
['ecw:product-price:down']
"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
$t
(
"
下架
"
)
:
$t
(
"
上架
"
)
}}
<
/el-butto
n
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['ecw:product-price:delete']
"
>
{{
$t
(
"
删除
"
)
}}
<
/el-butto
n
>
<
el
-
button
@
click
=
"
copyTemplate(scope.row)
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
"
复制模板
"
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 0)
"
v
-
if
=
"
scope.row.needOrderInquiry
"
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
"
取消单询
"
)
}}
<
/el-butto
n
>
<
el
-
button
@
click
=
"
setOrderInquiry(scope.row, 1)
"
v
-
else
size
=
"
mini
"
type
=
"
text
"
>
{{
$t
(
"
单询异常
"
)
}}
<
/el-butto
n
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<!--
分页组件
-->
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<
el
-
dialog
:
visible
=
"
!!showMoreStepPriceItem
"
:
before
-
close
=
"
closeMoreStepPrice
"
:
title
=
"
$t('查看阶梯价')
"
>
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<
el
-
dialog
:
visible
=
"
!!showMoreStepPriceItem
"
:
before
-
close
=
"
closeMoreStepPrice
"
:
title
=
"
$t('查看阶梯价')
"
>
<
el
-
row
:
gutter
=
"
20
"
v
-
if
=
"
showMoreStepPriceItem
"
>
<
el
-
col
:
span
=
"
12
"
>
<!--
全包价
-->
<
template
v
-
if
=
"
showMoreStepPriceItem.priceType
"
>
<
div
v
-
for
=
"
(item, index) in showMoreStepPriceItem.fullPriceStepList
"
>
<
div
v
-
for
=
"
(item, index) in showMoreStepPriceItem.fullPriceStepList
"
>
<
show
-
step
-
price
-
item
:
value
=
"
item
"
:
unit
-
map
=
"
unitMap
"
:
currency
-
map
=
"
currencyMap
"
:
index
=
"
index
"
field
-
prefix
=
"
all
"
:
price
-
name
=
"
$t('全包价')
"
><
/show-step-price-item
>
:
price
-
name
=
"
$t('全包价')
"
><
/show-step-price-item
>
<
/div
>
<
/template
>
<
template
v
-
else
>
<
template
v
-
if
=
"
showMoreStepPriceItem.freightPriceStepList
"
>
<
div
v
-
for
=
"
(item, index) in showMoreStepPriceItem.freightPriceStepList
"
>
<
div
v
-
for
=
"
(
item, index
) in showMoreStepPriceItem.freightPriceStepList
"
>
<
show
-
step
-
price
-
item
:
value
=
"
item
"
:
unit
-
map
=
"
unitMap
"
:
currency
-
map
=
"
currencyMap
"
:
index
=
"
index
"
field
-
prefix
=
"
transport
"
:
price
-
name
=
"
$t('运费')
"
><
/show-step-price-item
>
:
price
-
name
=
"
$t('运费')
"
><
/show-step-price-item
>
<
/div
>
<
/template
>
<
template
v
-
if
=
"
showMoreStepPriceItem.clearancePriceStepList
"
>
<
div
v
-
for
=
"
(item, index) in showMoreStepPriceItem.clearancePriceStepList
"
>
<
div
v
-
for
=
"
(
item, index
) in showMoreStepPriceItem.clearancePriceStepList
"
>
<
show
-
step
-
price
-
item
:
value
=
"
item
"
:
unit
-
map
=
"
unitMap
"
:
currency
-
map
=
"
currencyMap
"
:
index
=
"
index
"
field
-
prefix
=
"
clearance
"
:
price
-
name
=
"
$t('清关费')
"
><
/show-step-price-item
>
:
price
-
name
=
"
$t('清关费')
"
><
/show-step-price-item
>
<
/div
>
<
/template
>
<
/template
>
...
...
@@ -367,7 +806,7 @@
<!--
甲方要求不显示清关费
https
:
//zentao.test.jdshangmen.com/bug-view-5298.html
-->
<!--
<
el
-
col
:
span
=
"
12
"
v
-
if
=
"
[3,4].indexOf(+showMoreStepPriceItem.warehouseLineDO.transportType) > -1
"
>
<!--
<
el
-
col
:
span
=
"
12
"
v
-
if
=
"
[3,4].indexOf(+showMoreStepPriceItem.warehouseLineDO.transportType) > -1
"
>
<
template
v
-
if
=
"
showMoreStepPriceItem.clearPriceStepList.length
"
>
<
div
v
-
for
=
"
(item, index) in showMoreStepPriceItem.clearPriceStepList
"
>
<
div
class
=
"
page-title
"
>
...
...
@@ -386,7 +825,6 @@
<
/el-col>--
>
<
/el-row
>
<
/el-dialog
>
<
/div
>
<
/template
>
...
...
@@ -400,31 +838,31 @@ import {
exportProductPriceExcel
,
batchBlock
,
batchOff
,
updateOrderInquiry
updateOrderInquiry
,
}
from
"
@/api/ecw/productPrice
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getTradeCityList
,
getListTree
}
from
"
@/api/ecw/region
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
{
AuditStatusEnum
}
from
'
@/utils/constants
'
import
{
getAllChannelList
,
getChannelList
}
from
'
@/api/ecw/channel
'
import
DictTag
from
'
@/components/DictTag
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
{
getProduct
}
from
'
@/api/ecw/product
'
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
;
import
{
getUnitList
}
from
"
@/api/ecw/unit
"
;
import
{
AuditStatusEnum
}
from
"
@/utils/constants
"
;
import
{
getAllChannelList
,
getChannelList
}
from
"
@/api/ecw/channel
"
;
import
DictTag
from
"
@/components/DictTag
"
;
import
{
arrryToKeyedObjectBy
}
from
"
@/utils/index
"
;
import
{
getProduct
}
from
"
@/api/ecw/product
"
;
import
{
parseTime
}
from
"
@/utils/ruoyi
"
;
import
Template
from
"
@/views/cms/template
"
;
import
{
getStatusName
}
from
"
./util
"
;
import
{
getStatusName
}
from
"
./util
"
;
import
ShowStepPriceItem
from
"
@/views/ecw/productPrice/components/ShowStepPriceItem.vue
"
;
export
default
{
name
:
"
EcwProductpriceIndex
"
,
filters
:
{
parseTime
}
,
filters
:
{
parseTime
}
,
components
:
{
ShowStepPriceItem
,
Template
,
DictTag
DictTag
,
}
,
data
()
{
return
{
...
...
@@ -435,19 +873,20 @@ export default {
// 非多个禁用
multiple
:
true
,
//特性列表
attrList
:[],
attrList
:
[],
typeList
:
[],
product
:
null
,
countryList
:
[],
//目的国
warehouseList
:
[],
//目前仓
cityList
:
[],
/* startCityList: [], //始发地城市
destCityList: [], //目的地城市 */
routedList
:
[],
//已开头路线列表
currencyList
:
[],
//货币列表
unitList
:
[],
//单位列表
channelList
:
[]
,
// 渠道
routeParams
:
{
}
,
//路线搜索条件
channelList
:
[]
,
// 渠道
routeParams
:
{
}
,
//路线搜索条件
isUpdate
:
false
,
//更新操作
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -479,23 +918,74 @@ export default {
clearanceVolumeUnit
:
null
,
shippingChannelId
:
null
,
status
:
null
,
countryId
:
null
,
//国家
}
,
// 表单参数
form
:
{
typeId
:
null
,
titleZh
:
null
titleZh
:
null
,
}
,
// 表单校验
rules
:
{
typeId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
产品类型不能为空
"
),
trigger
:
"
blur
"
}
],
titleZh
:
[{
required
:
true
,
message
:
this
.
$t
(
"
产品名称不能为空
"
),
trigger
:
"
blur
"
}
],
titleEn
:
[{
required
:
true
,
message
:
this
.
$t
(
"
英文名称不能为空
"
),
trigger
:
"
blur
"
}
],
transportPrice
:
[{
required
:
true
,
message
:
this
.
$t
(
"
海运费不能为空
"
),
trigger
:
"
blur
"
}
],
clearancePrice
:
[{
required
:
true
,
message
:
this
.
$t
(
"
清关费不能为空
"
),
trigger
:
"
blur
"
}
],
advanceStatus
:
[{
required
:
true
,
message
:
this
.
$t
(
"
是否预付不能为空
"
),
trigger
:
"
blur
"
}
],
containerLocation
:[{
required
:
true
,
message
:
this
.
$t
(
"
货柜位置不能为空
"
),
trigger
:
"
blur
"
}
],
square
:[{
required
:
true
,
message
:
this
.
$t
(
"
方数不能为空
"
),
trigger
:
"
blur
"
}
],
needBook
:[{
required
:
true
,
message
:
this
.
$t
(
"
预约入仓不能为空
"
),
trigger
:
"
blur
"
}
],
typeId
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
产品类型不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
titleZh
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
产品名称不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
titleEn
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
英文名称不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
transportPrice
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
海运费不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
clearancePrice
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
清关费不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
advanceStatus
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
是否预付不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
containerLocation
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
货柜位置不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
square
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
方数不能为空
"
),
trigger
:
"
blur
"
}
,
],
needBook
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
预约入仓不能为空
"
),
trigger
:
"
blur
"
,
}
,
],
}
,
lineList
:
[],
...
...
@@ -505,7 +995,7 @@ export default {
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
),
// 查看更多阶梯价
showMoreStepPriceItem
:
null
,
entryPath
:
null
entryPath
:
null
,
}
;
}
,
...
...
@@ -513,112 +1003,117 @@ export default {
// 路径中的运输方式参数
transportType
()
{
// product-price-1_2的格式,如果没有三段则最后一段不是运输方式
return
this
.
$route
.
path
.
split
(
'
-
'
)[
2
]
||
''
;
return
this
.
$route
.
path
.
split
(
"
-
"
)[
2
]
||
""
;
}
,
// 路由中的标题
routeName
(){
return
this
.
$route
.
name
routeName
()
{
return
this
.
$route
.
name
;
}
,
// 类型,transportType是1和2(1_2用一个表示)表示海运,3和4表示空运
type
(){
type
()
{
// 如果没有则表示商品路线价格
if
(
!
this
.
transportType
)
{
return
null
if
(
!
this
.
transportType
)
{
return
null
;
}
return
[
'
3
'
,
'
4
'
].
indexOf
(
this
.
transportType
)
>
-
1
?
'
air
'
:
'
sea
'
return
[
"
3
"
,
"
4
"
].
indexOf
(
this
.
transportType
)
>
-
1
?
"
air
"
:
"
sea
"
;
}
,
// 商品名称
productTitle
(){
if
(
!
this
.
product
)
{
return
''
productTitle
()
{
if
(
!
this
.
product
)
{
return
""
;
}
return
this
.
product
.
titleZh
return
this
.
product
.
titleZh
;
}
,
// 渠道用id做键值
keyedChannel
(){
return
arrryToKeyedObjectBy
(
this
.
channelList
,
'
channelId
'
)
keyedChannel
()
{
return
arrryToKeyedObjectBy
(
this
.
channelList
,
"
channelId
"
);
}
,
// 根据渠道id获取渠道名
channelName
(){
return
id
=>
{
return
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
}
channelName
()
{
return
(
id
)
=>
{
return
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
;
}
;
}
,
// 根据类型获取类型名称
getTypeName
()
{
return
typeId
=>
{
for
(
let
index
in
this
.
typeList
)
{
return
(
typeId
)
=>
{
for
(
let
index
in
this
.
typeList
)
{
let
typeItem
=
this
.
typeList
[
index
];
if
(
typeItem
.
id
==
typeId
)
{
return
this
.
$l
(
typeItem
,
'
title
'
);
}
if
(
typeItem
.
id
==
typeId
)
{
return
this
.
$l
(
typeItem
,
"
title
"
);
}
}
}
;
}
,
// 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定
statusName
()
{
return
getStatusName
return
getStatusName
;
}
,
// 根据运输方式获取名称
transportName
()
{
return
transportType
=>
{
return
this
.
getDictDataLabel
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
,
transportType
)
}
return
(
transportType
)
=>
{
return
this
.
getDictDataLabel
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
,
transportType
);
}
;
}
,
// 显示币种符号
getCurrencySymbol
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currencyList
)
{
return
(
currencyId
)
=>
{
for
(
let
index
in
this
.
currencyList
)
{
let
currecyItem
=
this
.
currencyList
[
index
];
if
(
currecyItem
.
id
==
currencyId
)
{
if
(
currecyItem
.
id
==
currencyId
)
{
return
currecyItem
.
fuhao
;
}
}
}
}
;
}
,
// 显示币种名称
getCurrencyTitle
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currencyList
)
{
return
(
currencyId
)
=>
{
for
(
let
index
in
this
.
currencyList
)
{
let
currecyItem
=
this
.
currencyList
[
index
];
if
(
currecyItem
.
id
==
currencyId
)
{
return
this
.
$l
(
currecyItem
,
'
title
'
);
}
if
(
currecyItem
.
id
==
currencyId
)
{
return
this
.
$l
(
currecyItem
,
"
title
"
);
}
}
}
;
}
,
getUnitTitle
()
{
return
unitId
=>
{
for
(
let
index
in
this
.
unitList
)
{
return
(
unitId
)
=>
{
for
(
let
index
in
this
.
unitList
)
{
let
unitItem
=
this
.
unitList
[
index
];
if
(
unitItem
.
id
==
unitId
)
{
return
this
.
$l
(
unitItem
,
'
title
'
);
}
if
(
unitItem
.
id
==
unitId
)
{
return
this
.
$l
(
unitItem
,
"
title
"
);
}
}
}
;
}
,
startCityList
(){
return
this
.
cityList
.
filter
(
item
=>
item
.
type
==
2
||
item
.
type
==
3
)
startCityList
()
{
//字典:贸易类型字典region_trade_type,0非进出口,1进口,2出口,3进出口
return
this
.
cityList
.
filter
((
item
)
=>
item
.
type
==
2
||
item
.
type
==
3
);
}
,
destCityList
(){
return
this
.
cityList
.
filter
(
item
=>
item
.
type
==
1
||
item
.
type
==
3
)
destCityList
()
{
//字典:贸易类型字典region_trade_type,0非进出口,1进口,2出口,3进出口
return
this
.
cityList
.
filter
((
item
)
=>
item
.
type
==
1
||
item
.
type
==
3
);
}
,
currencyMap
(){
let
map
=
{
}
this
.
currencyList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
}
)
return
map
currencyMap
()
{
let
map
=
{
}
;
this
.
currencyList
.
forEach
(
(
item
)
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
"
title
"
);
}
)
;
return
map
;
}
,
unitMap
(){
let
map
=
{
}
this
.
unitList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
}
)
return
map
unitMap
()
{
let
map
=
{
}
;
this
.
unitList
.
forEach
(
(
item
)
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
"
title
"
);
}
)
;
return
map
;
}
,
}
,
activated
()
{
...
...
@@ -635,84 +1130,91 @@ export default {
}
this.handleQuery()
*/
if
(
this
.
$route
.
query
.
product_type
)
{
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
+
this
.
$route
.
query
.
product_type
);
if
(
this
.
$route
.
query
.
product_type
)
{
this
.
$set
(
this
.
queryParams
,
"
typeId
"
,
+
this
.
$route
.
query
.
product_type
);
}
if
(
this
.
$route
.
query
.
transportType
){
this
.
$set
(
this
.
queryParams
,
'
transportType
'
,
+
this
.
$route
.
query
.
transportType
);
if
(
this
.
$route
.
query
.
transportType
)
{
this
.
$set
(
this
.
queryParams
,
"
transportType
"
,
+
this
.
$route
.
query
.
transportType
);
}
// 指定产品获取产品信息
if
(
this
.
$route
.
query
.
product_id
){
this
.
$set
(
this
.
queryParams
,
'
productId
'
,
+
this
.
$route
.
query
.
product_id
);
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
}
)
}
else
{
if
(
this
.
$route
.
query
.
product_id
)
{
this
.
$set
(
this
.
queryParams
,
"
productId
"
,
+
this
.
$route
.
query
.
product_id
);
getProduct
(
this
.
$route
.
query
.
product_id
).
then
((
res
)
=>
{
this
.
product
=
res
.
data
;
}
);
}
else
{
if
(
this
.
transportType
)
{
// 如果指定了单个的运输方式则赋值
if
(
this
.
transportType
.
split
(
'
_
'
).
length
==
1
)
{
this
.
$set
(
this
.
queryParams
,
'
transportType
'
,
+
this
.
transportType
)
if
(
this
.
transportType
.
split
(
"
_
"
).
length
==
1
)
{
this
.
$set
(
this
.
queryParams
,
"
transportType
"
,
+
this
.
transportType
);
}
}
}
}
,
watch
:{
'
$route.query.product_id
'
()
{
watch
:
{
"
$route.query.product_id
"
()
{
// if(!this.$route.query.product_id)
{
// return this.product = null
//
}
// 价格列表 跟 商品的价格列表,有时候商品价格列表的路由变动会导致价格列表也执行此处代码,所以做一个判断排除
// https://zentao.test.jdshangmen.com/bug-view-4928.html
if
(
this
.
$route
.
path
!=
this
.
entryPath
)
return
if
(
this
.
$route
.
path
!=
this
.
entryPath
)
return
;
let
productId
=
this
.
product
?.
id
if
(
this
.
$route
.
name
===
'
ProductPrice
'
)
{
if
(
this
.
$route
.
query
.
product_id
!=
productId
)
{
let
productId
=
this
.
product
?.
id
;
if
(
this
.
$route
.
name
===
"
ProductPrice
"
)
{
if
(
this
.
$route
.
query
.
product_id
!=
productId
)
{
this
.
queryParams
=
{
pageNo
:
1
,
pageSize
:
10
,
productId
:
this
.
$route
.
query
.
product_id
,
typeId
:
this
.
$route
.
query
.
product_type
,
transportType
:
this
.
$route
.
query
.
transportType
}
transportType
:
this
.
$route
.
query
.
transportType
,
}
;
}
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
}
)
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
(
res
)
=>
{
this
.
product
=
res
.
data
;
}
)
;
this
.
getList
();
}
}
}
,
}
,
created
()
{
this
.
entryPath
=
this
.
$route
.
path
if
(
this
.
$route
.
query
.
product_type
)
{
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
+
this
.
$route
.
query
.
product_type
);
this
.
entryPath
=
this
.
$route
.
path
;
if
(
this
.
$route
.
query
.
product_type
)
{
this
.
$set
(
this
.
queryParams
,
"
typeId
"
,
+
this
.
$route
.
query
.
product_type
);
}
if
(
this
.
$route
.
query
.
transportType
){
this
.
$set
(
this
.
queryParams
,
'
transportType
'
,
+
this
.
$route
.
query
.
transportType
);
if
(
this
.
$route
.
query
.
transportType
)
{
this
.
$set
(
this
.
queryParams
,
"
transportType
"
,
+
this
.
$route
.
query
.
transportType
);
}
// 指定产品获取产品信息
if
(
this
.
$route
.
query
.
product_id
)
{
this
.
$set
(
this
.
queryParams
,
'
productId
'
,
+
this
.
$route
.
query
.
product_id
);
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
}
)
}
else
{
if
(
this
.
transportType
)
{
if
(
this
.
$route
.
query
.
product_id
)
{
this
.
$set
(
this
.
queryParams
,
"
productId
"
,
+
this
.
$route
.
query
.
product_id
);
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
(
res
)
=>
{
this
.
product
=
res
.
data
;
}
)
;
}
else
{
if
(
this
.
transportType
)
{
// 如果指定了单个的运输方式则赋值
if
(
this
.
transportType
.
split
(
'
_
'
).
length
==
1
)
{
this
.
$set
(
this
.
queryParams
,
'
transportType
'
,
+
this
.
transportType
)
if
(
this
.
transportType
.
split
(
"
_
"
).
length
==
1
)
{
this
.
$set
(
this
.
queryParams
,
"
transportType
"
,
+
this
.
transportType
);
}
}
this
.
getAttrList
();
}
//获取城市列表
this
.
getAllCityList
()
this
.
getChannelList
()
this
.
getTypeList
()
this
.
getCountryList
();
this
.
getAllCityList
();
this
.
getChannelList
();
this
.
getTypeList
();
this
.
getAttrList
();
...
...
@@ -723,56 +1225,60 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
getList
();
}
)
}
)
;
}
,
methods
:
{
getChannelList
(){
getAllChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
/* 国家 */
getCountryList
()
{
getListTree
({
treeType
:
1
}
).
then
((
response
)
=>
{
this
.
countryList
=
response
.
data
;
}
);
}
,
//渠道
getChannelList
()
{
getAllChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
));
}
,
/** 获取产品属性列表 */
getAttrList
()
{
getProductAttrList
().
then
(
response
=>
{
getProductAttrList
().
then
(
(
response
)
=>
{
this
.
attrList
=
response
.
data
;
}
)
}
)
;
}
,
/** 获取产品类型列表 */
getTypeList
()
{
getProductTypeList
().
then
(
response
=>
{
getProductTypeList
().
then
(
(
response
)
=>
{
this
.
typeList
=
response
.
data
;
}
)
}
)
;
}
,
/**获取所有城市列表 */
getAllCityList
()
{
getTradeCityList
({
}
).
then
(
response
=>
{
getTradeCityList
({
}
).
then
(
(
response
)
=>
{
this
.
cityList
=
response
.
data
;
}
)
}
)
;
}
,
/**获取已开通路线列表 */
getOpenedRouterList
()
{
openedRouterList
(
this
.
routeParams
).
then
(
response
=>
{
openedRouterList
(
this
.
routeParams
).
then
((
response
)
=>
{
this
.
routedList
=
response
.
data
;
this
.
setDefaultSelect
();
}
)
}
);
}
,
/**获取所有货币列表 */
requestCurrencyList
()
{
getCurrencyList
().
then
(
response
=>
{
getCurrencyList
().
then
(
(
response
)
=>
{
this
.
currencyList
=
response
.
data
;
}
)
}
)
;
}
,
/**获取所有单位列表 */
requestUnitList
()
{
getUnitList
().
then
(
response
=>
{
getUnitList
().
then
(
(
response
)
=>
{
this
.
unitList
=
response
.
data
;
}
)
}
)
;
}
,
/*handleSelectionChange(val) {
...
...
@@ -798,29 +1304,34 @@ export default {
}
,
handleStatusChange
(
row
)
{
updateProductPrice
(
row
).
then
(()
=>
{
updateProductPrice
(
row
)
.
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
}
).
catch
(
function
()
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
)
.
catch
(
function
()
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
);
}
,
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
console
.
log
(
this
.
queryParams
,
'
this.queryParams
'
)
console
.
log
(
this
.
queryParams
,
"
this.queryParams
"
);
// 处理查询参数
let
params
=
{
...
this
.
queryParams
}
;
if
(
this
.
type
==
'
sea
'
)
{
params
.
transportType
=
1
let
params
=
{
...
this
.
queryParams
}
;
if
(
this
.
type
==
"
sea
"
)
{
params
.
transportType
=
1
;
}
if
(
this
.
type
==
'
air
'
)
{
params
.
transportType
=
3
if
(
this
.
type
==
"
air
"
)
{
params
.
transportType
=
3
;
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
);
// 执行查询
console
.
log
(
params
,
'
params
'
)
getProductPricePage
(
params
).
then
(
response
=>
{
console
.
log
(
params
,
"
params
"
);
getProductPricePage
(
params
).
then
(
(
response
)
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
...
...
@@ -850,11 +1361,11 @@ export default {
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
queryParams
.
setPrice
=
undefined
this
.
queryParams
.
blacklist
=
undefined
if
(
this
.
queryParams
.
combStatus
)
{
let
tmp
=
this
.
queryParams
.
combStatus
.
split
(
'
_
'
)
this
.
queryParams
[
tmp
[
0
]]
=
tmp
[
1
]
this
.
queryParams
.
setPrice
=
undefined
;
this
.
queryParams
.
blacklist
=
undefined
;
if
(
this
.
queryParams
.
combStatus
)
{
let
tmp
=
this
.
queryParams
.
combStatus
.
split
(
"
_
"
);
this
.
queryParams
[
tmp
[
0
]]
=
tmp
[
1
]
;
}
this
.
getList
();
}
,
...
...
@@ -866,55 +1377,64 @@ export default {
}
,
/** 新增按钮操作 */
handleAdd
(
type
)
{
return
this
.
$router
.
push
(
`../../lineProject/product-price/edit-${type
}
?`
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
return
this
.
$router
.
push
(
`../../lineProject/product-price/edit-${type
}
?`
+
new
URLSearchParams
(
this
.
$route
.
query
).
toString
()
);
}
,
// 批量修改单个商品的价格(一条或者多条,后者全部路线)
batchSetSingleProductPrice
(
type
){
this
.
$router
.
push
(
`../../lineProject/product-price/edit-${type
}
?action=batchUpdate&type=${type
}
&product_id=${this.$route.query.product_id
}
&ids=${this.ids
}
`
)
batchSetSingleProductPrice
(
type
)
{
this
.
$router
.
push
(
`../../lineProject/product-price/edit-${type
}
?action=batchUpdate&type=${type
}
&product_id=${this.$route.query.product_id
}
&ids=${this.ids
}
`
);
}
,
// 批量设置路线
handleBatchEdit
(
type
)
{
this
.
$router
.
push
(
'
../../lineProject/batch-edit-
'
+
type
)
this
.
$router
.
push
(
"
../../lineProject/batch-edit-
"
+
type
);
}
,
/** 修改按钮操作 */
handleUpdate
(
row
,
readonly
)
{
let
transportType
=
row
.
warehouseLineDO
.
transportType
let
type
=
transportType
==
3
||
transportType
==
4
?
'
air
'
:
'
sea
'
let
url
=
`../../lineProject/product-price/edit-${type
}
?action=update&id=${row.id
}
`
if
(
readonly
)
url
+=
'
&readonly=1
'
return
this
.
$router
.
push
(
url
)
let
transportType
=
row
.
warehouseLineDO
.
transportType
;
let
type
=
transportType
==
3
||
transportType
==
4
?
"
air
"
:
"
sea
"
;
let
url
=
`../../lineProject/product-price/edit-${type
}
?action=update&id=${row.id
}
`
;
if
(
readonly
)
url
+=
"
&readonly=1
"
;
return
this
.
$router
.
push
(
url
)
;
}
,
updateStatus
(
row
,
type
)
{
if
(
type
==
'
blacklist
'
)
{
row
.
blacklist
=
row
.
blacklist
==
0
?
1
:
0
;
}
else
if
(
type
==
'
auditStatus
'
)
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
if
(
type
==
"
blacklist
"
)
{
row
.
blacklist
=
row
.
blacklist
==
0
?
1
:
0
;
}
else
if
(
type
==
"
auditStatus
"
)
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
updateProductPrice
(
row
).
then
(()
=>
{
updateProductPrice
(
row
)
.
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
}
).
catch
(
function
()
{
if
(
statusType
==
'
blacklist
'
)
{
}
)
.
catch
(
function
()
{
if
(
statusType
==
"
blacklist
"
)
{
row
.
blacklist
=
row
.
blacklist
===
1
?
0
:
1
;
}
else
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
}
);
}
,
checkSelectable
()
{
return
!
this
.
isUpdate
;
}
,
setDefaultSelect
()
{
let
vm
=
this
;
setTimeout
(()
=>
{
// 修改线路价格,选中已经选择的
if
(
vm
.
isUpdate
&&
vm
.
routedList
&&
vm
.
routedList
.
length
)
{
if
(
vm
.
isUpdate
&&
vm
.
routedList
&&
vm
.
routedList
.
length
)
{
vm
.
$refs
.
routeTable
.
toggleRowSelection
(
vm
.
routedList
[
0
]);
}
}
,
300
);
...
...
@@ -960,77 +1480,90 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除产品价格编号为{id
}
的数据项?
'
,
{
id
}
)).
then
(
function
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认删除产品价格编号为{id
}
的数据项?
"
,
{
id
}
))
.
then
(
function
()
{
return
deleteProductPrice
(
id
);
}
).
then
(()
=>
{
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
}
).
catch
(()
=>
{
}
);
}
)
.
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{
...
this
.
queryParams
}
;
let
params
=
{
...
this
.
queryParams
}
;
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
if
(
this
.
type
==
'
sea
'
)
{
params
.
transportType
=
1
if
(
this
.
type
==
"
sea
"
)
{
params
.
transportType
=
1
;
}
if
(
this
.
type
==
'
air
'
)
{
params
.
transportType
=
3
if
(
this
.
type
==
"
air
"
)
{
params
.
transportType
=
3
;
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认导出所有数据项?
'
)).
then
(()
=>
{
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
);
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认导出所有数据项?
"
))
.
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportProductPriceExcel
(
params
);
}
).
then
(
response
=>
{
}
)
.
then
((
response
)
=>
{
// this.$download.excel(response, '路线价格.xlsx');
this
.
exportLoading
=
false
;
this
.
$message
.
success
(
this
.
$t
(
'
已加入导出队列,请稍后在下载日志中下载
'
))
}
).
catch
(()
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
已加入导出队列,请稍后在下载日志中下载
"
)
);
}
)
.
catch
(()
=>
{
this
.
exportLoading
=
false
;
}
);
}
,
// 表格多选
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
batchBlock
(){
batchBlock
({
ids
:
this
.
ids
.
join
(
'
,
'
)
}
).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
}
)
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
id
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
}
,
batchOff
(){
batchOff
({
ids
:
this
.
ids
.
join
(
'
,
'
)
}
).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
}
)
batchBlock
()
{
batchBlock
({
ids
:
this
.
ids
.
join
(
"
,
"
)
}
).
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
"
操作成功
"
));
this
.
getList
();
}
);
}
,
batchOff
()
{
batchOff
({
ids
:
this
.
ids
.
join
(
"
,
"
)
}
).
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
"
操作成功
"
));
this
.
getList
();
}
);
}
,
// 设置,取消単询
setOrderInquiry
(
row
,
needOrderInquiry
){
row
.
needOrderInquiry
=
needOrderInquiry
updateOrderInquiry
(
row
).
then
(
res
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
'
操作成功
'
))
this
.
getList
()
}
)
setOrderInquiry
(
row
,
needOrderInquiry
)
{
row
.
needOrderInquiry
=
needOrderInquiry
;
updateOrderInquiry
(
row
).
then
(
(
res
)
=>
{
this
.
$message
.
success
(
res
.
msg
||
this
.
$t
(
"
操作成功
"
));
this
.
getList
()
;
}
)
;
}
,
// 复制模板
copyTemplate
(
row
){
copyTemplate
(
row
)
{
// 跳转到批量设置页面,并填充数据
let
transportType
=
row
.
warehouseLineDO
.
transportType
this
.
$router
.
push
(
`../../lineProject/batch-edit-${transportType == 3 || transportType == 4 ? 'air' : 'sea'
}
?templateId=${row.id
}
`
)
let
transportType
=
row
.
warehouseLineDO
.
transportType
;
this
.
$router
.
push
(
`../../lineProject/batch-edit-${
transportType == 3 || transportType == 4 ? "air" : "sea"
}
?templateId=${row.id
}
`
);
}
,
// 关闭更多阶梯价格窗口
closeMoreStepPrice
(){
this
.
showMoreStepPriceItem
=
null
}
}
closeMoreStepPrice
()
{
this
.
showMoreStepPriceItem
=
null
;
}
,
}
,
}
;
<
/script
>
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