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
ad478141
Commit
ad478141
authored
Jul 14, 2022
by
ylpmty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情 批量设置路线
parent
b0663d15
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
698 additions
and
330 deletions
+698
-330
order.js
src/api/ecw/order.js
+2
-2
productPrice.js
src/api/ecw/productPrice.js
+18
-0
detail.vue
src/views/ecw/order/detail.vue
+175
-0
edit.vue
src/views/ecw/order/edit.vue
+1
-1
index.vue
src/views/ecw/order/index.vue
+163
-68
edit.vue
src/views/ecw/productPrice/edit.vue
+317
-256
index.vue
src/views/ecw/productPrice/index.vue
+22
-3
No files found.
src/api/ecw/order.js
View file @
ad478141
...
...
@@ -27,9 +27,9 @@ export function deleteOrder(id) {
}
// 获得订单
export
function
getOrder
(
i
d
)
{
export
function
getOrder
(
orderI
d
)
{
return
request
({
url
:
'
/ecw/order/
get?id=
'
+
i
d
,
url
:
'
/ecw/order/
info/
'
+
orderI
d
,
method
:
'
get
'
})
}
...
...
src/api/ecw/productPrice.js
View file @
ad478141
...
...
@@ -52,3 +52,21 @@ export function exportProductPriceExcel(query) {
responseType
:
'
blob
'
})
}
// 批量获得产品价格
export
function
getProductPriceList
(
query
)
{
return
request
({
url
:
'
/ecw/product-price/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 批量修改产品价格
export
function
batchUpdateProductPrice
(
query
)
{
return
request
({
url
:
'
/ecw/product-price/batchUpdate
'
,
method
:
'
put
'
,
data
:
query
})
}
src/views/ecw/order/detail.vue
0 → 100644
View file @
ad478141
<
template
>
<div
class=
"app-container"
>
<el-card
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
订单详情-EC00636U-CNG2506-01
</div>
<div
slot=
"header"
class=
"card-title"
>
订单编号:EC00636U
</div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-descriptions
class=
"margin-top"
border
title=
"发货人"
:column=
"2"
>
<el-descriptions-item
label=
"发货人"
>
kooriookami
</el-descriptions-item>
<el-descriptions-item
label=
"发货人电话"
>
18100000000
</el-descriptions-item>
<el-descriptions-item
label=
"发货人邮箱"
>
18100000000
</el-descriptions-item>
<el-descriptions-item
label=
"发货人公司名称"
>
<el-tag
size=
"small"
>
学校学校学校学校
</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col
:span=
"12"
>
<el-descriptions
class=
"margin-top"
border
title=
"收货人"
:column=
"2"
>
<el-descriptions-item
label=
"收货人"
>
kooriookami
</el-descriptions-item>
<el-descriptions-item
label=
"收货人电话"
>
18100000000
</el-descriptions-item>
<el-descriptions-item
label=
"收货人邮箱"
>
18100000000
</el-descriptions-item>
<el-descriptions-item
label=
"收货人公司名称"
>
<el-tag
size=
"small"
>
学校学校学校学校
</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-card>
<el-card
class=
"card"
>
<div
slot=
"header"
class=
"card-title"
>
物流信息/基础信息
</div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-descriptions
class=
"margin-top"
border
title=
"物流信息"
:column=
"2"
>
<el-descriptions-item
label=
"始发仓"
>
广州仓
</el-descriptions-item>
<el-descriptions-item
label=
"目的仓"
>
Dubai
</el-descriptions-item>
<el-descriptions-item
label=
"地址"
:span=
"2"
>
广州市白云区鹤边鹤泰二横路民通院内第一栋捷道仓库E
&
C(收货时间周一至周六10:00-19:30)
</el-descriptions-item>
<el-descriptions-item
label=
"运输方式"
>
海运拼柜
</el-descriptions-item>
<el-descriptions-item
label=
"出货渠道"
>
/
</el-descriptions-item>
</el-descriptions>
</el-col>
<el-col
:span=
"12"
>
<el-descriptions
class=
"margin-top"
border
title=
"基础信息"
:column=
"2"
>
<el-descriptions-item
label=
"唛头"
>
kooriookami
</el-descriptions-item>
<el-descriptions-item
label=
"送货时间"
>
2022-05-22
</el-descriptions-item>
<el-descriptions-item
label=
"是否控货"
>
否
</el-descriptions-item>
<el-descriptions-item
label=
"填单信息"
>
22箱 1000KG 14m³
</el-descriptions-item>
<el-descriptions-item
label=
"仓库实测"
>
123箱 900Kg 11.23m³
</el-descriptions-item>
<el-descriptions-item
label=
"收款数据"
>
123箱 900Kg 11.23m³
</el-descriptions-item>
<el-descriptions-item
label=
"入仓类型"
>
一次到齐
</el-descriptions-item>
<el-descriptions-item
label=
"单证报关"
>
我司全代
</el-descriptions-item>
<el-descriptions-item
label=
"代收货款"
>
是(50000美元)
</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
</el-card>
<el-card
class=
"card"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"货物详情"
name=
"first"
>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
>
<el-table-column
prop=
"date"
label=
"中文品名"
/>
<el-table-column
prop=
"name"
label=
"英文品名"
/>
<el-table-column
prop=
"address"
label=
"品牌"
/>
<el-table-column
prop=
"address"
label=
"填单件数"
/>
<el-table-column
prop=
"address"
label=
"入仓件数"
/>
<el-table-column
prop=
"address"
label=
"单位"
/>
<el-table-column
prop=
"address"
label=
"货值"
/>
<el-table-column
prop=
"address"
label=
"材质"
/>
<el-table-column
prop=
"address"
label=
"体积(m3)"
/>
<el-table-column
prop=
"address"
label=
"重量(kg)"
/>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-tab-pane>
<el-tab-pane
label=
"订单动态"
name=
"second"
>
<el-timeline
:reverse=
"true"
>
<el-timeline-item
v-for=
"(activity, index) in activities"
:key=
"index"
:timestamp=
"activity.timestamp"
>
{{
activity
.
content
}}
</el-timeline-item>
</el-timeline>
</el-tab-pane>
<el-tab-pane
label=
"运单资料/提货单"
name=
"three"
>
<el-descriptions
class=
"margin-top"
border
title=
""
:column=
"3"
>
<el-descriptions-item
label=
"单票立即转运"
>
是
</el-descriptions-item>
<el-descriptions-item
label=
"包装类型"
>
纸箱
</el-descriptions-item>
<el-descriptions-item
label=
"包装要求备注"
>
多个订单一起打包,不要单独打
</el-descriptions-item>
</el-descriptions>
<el-button
type=
"text"
>
查看入仓单
</el-button>
<el-button
type=
"text"
disabled
>
<el-dropdown>
<span
class=
"el-dropdown-link"
>
查看提货单
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item>
海运提货单
</el-dropdown-item>
<el-dropdown-item>
空运提货单
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-button>
<el-button
:disabled=
"true"
type=
"text"
>
装箱单未上传
</el-button>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</
template
>
<
script
>
import
{
getOrder
}
from
'
@/api/ecw/order
'
export
default
{
name
:
"
detail
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
false
,
list
:
[],
activeName
:
'
first
'
,
orderId
:
17
,
tableData
:
[],
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
},
activities
:
[{
content
:
'
活动按期开始
'
,
timestamp
:
'
2018-04-15
'
},
{
content
:
'
通过审核
'
,
timestamp
:
'
2018-04-13
'
},
{
content
:
'
创建成功
'
,
timestamp
:
'
2018-04-11
'
}]
};
},
created
()
{
if
(
this
.
$route
.
query
.
orderId
)
{
this
.
orderId
=
this
.
$route
.
query
.
orderId
this
.
getList
();
}
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
let
that
=
this
that
.
loading
=
true
;
// 执行查询
getOrder
(
that
.
orderId
).
then
(
response
=>
{
that
.
list
=
response
.
data
;
});
},
}
};
</
script
>
<
style
scoped
>
.card
{
margin-bottom
:
20px
;
}
.el-dropdown-link
{
cursor
:
pointer
;
color
:
#409EFF
;
}
.el-icon-arrow-down
{
font-size
:
12px
;
}
</
style
>
src/views/ecw/order/edit.vue
View file @
ad478141
...
...
@@ -67,7 +67,7 @@
</el-descriptions-item>
<el-descriptions-item
label=
"*目的城市"
>
<el-form-item
label=
""
label-width=
"0"
style=
"margin-bottom: 0"
prop=
"objectiveId"
required
error=
"目的城市必选"
>
<el-select
v-model=
"form.objectiveId"
placeholder=
"请选择
始发
地"
>
<el-select
v-model=
"form.objectiveId"
placeholder=
"请选择
目的
地"
>
<el-option
v-for=
"item in importCityList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
...
...
src/views/ecw/order/index.vue
View file @
ad478141
...
...
@@ -2,19 +2,85 @@
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
>
<el-form-item
label=
"订单编号"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.orderNo"
placeholder=
"
请输入订单编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.orderNo"
placeholder=
"
订单编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品备案属性"
prop=
"productRecord"
>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"queryParams.productRecord"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-form-item
label=
"唛头"
prop=
"marks"
>
<el-input
v-model=
"queryParams.marks"
placeholder=
"唛头"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"控货状态"
prop=
"cargoControlStatus"
>
<dict-selector
:type=
"DICT_TYPE.CONTROL_GOODS_STATUS"
v-model=
"queryParams.cargoControlStatus"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-form-item
label=
"发货人"
prop=
"consignorId"
>
<el-input
v-model=
"queryParams.consignorId"
placeholder=
"发货人"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"收货人"
prop=
"consigneeId"
>
<el-input
v-model=
"queryParams.consigneeId"
placeholder=
"收货人"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startWarehouseId"
>
<el-select
v-model=
"queryParams.startWarehouseId"
placeholder=
"请选择始发地"
>
<el-option
v-for=
"item in expoerCityList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destWarehouseId"
>
<el-select
v-model=
"queryParams.destWarehouseId"
placeholder=
"请选择目的地"
>
<el-option
v-for=
"item in importCityList"
:label=
"item.titleZh"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"运输方式"
prop=
"transportId"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
formatter=
"number"
/>
</el-form-item>
<el-form-item
label=
"商品分类"
prop=
"goodsType"
>
<selector
v-model=
"queryParams.goodsType"
:options=
"productAttrList"
label-field=
"attrName"
value-field=
"id"
>
</selector>
</el-form-item>
<el-form-item
label=
"品名"
prop=
"prodId"
>
<product-selector
v-model=
"queryParams.prodId"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"品牌"
prop=
"brand"
>
<dict-selector
v-model=
"queryParams.brand"
:type=
"DICT_TYPE.ECW_IS_BRAND"
formatter=
"bool"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"报关类别"
prop=
"customsType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-form-item
label=
"提单号"
prop=
"tidanNo"
>
<el-input
v-model=
"queryParams.tidanNo"
placeholder=
"提单号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"控货"
prop=
"isCargoControl"
>
<dict-selector
v-model=
"queryParams.isCargoControl"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
/>
</el-form-item>
<el-form-item
label=
"入仓类型"
prop=
"warehouseType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model=
"queryParams.warehousingType"
/>
</el-form-item>
<!--
<el-form-item
label=
"跟进客服"
prop=
""
>
<customer-selector
v-model=
""
/>
</el-form-item>
-->
<el-form-item
label=
"订单状态"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.PAY_ORDER_STATUS"
v-model=
"queryParams.status"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"报关方式"
prop=
"customsType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<!--
<el-form-item
label=
"是否齐货"
prop=
"customsType"
>
<dict-selector
v-model=
"queryParams.isCargoControl"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
/>
</el-form-item>
-->
<el-form-item
label=
"重货比"
prop=
"weightRatio"
>
<el-input
style=
"width: 100px;"
v-model=
"molecule"
placeholder=
""
clearable
@
change=
"moleculeChange"
@
keyup.enter.native=
"handleQuery"
/>
-
<el-input
style=
"width: 100px;"
v-model=
"denominator"
placeholder=
""
clearable
@
change=
"denominatorChange"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"备案属性"
prop=
"productRecord"
>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"queryParams.productRecord"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"快递单号"
prop=
"number"
>
<el-input
v-model=
"queryParams.number"
placeholder=
"快递单号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
...
...
@@ -27,67 +93,53 @@
<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:order:create']"
>
新增
</el-button>
v-hasPermi=
"['ecw:order:create']"
>
新增
</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:order:export']"
>
导出
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleEdit"
:disabled=
"multiple"
>
批量调仓
</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:order: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=
"主键ID"
align=
"center"
prop=
"orderId
"
/>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center
"
/>
<el-table-column
label=
"订单编号"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
label=
"父编号"
align=
"center"
prop=
"parentNumber"
/>
<el-table-column
label=
"下单会员"
align=
"center"
prop=
"userId"
/>
<el-table-column
label=
"唛头"
align=
"center"
prop=
"marks"
/>
<el-table-column
label=
"产品备案属性"
align=
"center"
prop=
"productRecord"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
productRecord
|
recordFilter
(
productRecordList
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"控货状态"
align=
"center"
prop=
"cargoControlStatus"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
cargoControlStatus
|
cargoControlStatusFilter
(
cargoControlStatusList
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"入仓箱数"
align=
"center"
prop=
"sumNum"
/>
<el-table-column
label=
"入仓重量"
align=
"center"
prop=
"sumWeight"
/>
<el-table-column
label=
"
报关类别"
align=
"center"
prop=
"customsType
"
>
<el-table-column
label=
"
运输方式"
align=
"center"
prop=
"transportId
"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
customsType
|
customsTypeFilter
(
customsType
List
)
}}
</span>
<span>
{{
scope
.
row
.
transportId
|
transportFilter
(
transport
List
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"订单状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
|
customsTypeFilter
(
customsType
List
)
}}
</span>
<span>
{{
scope
.
row
.
status
|
orderStatusFilter
(
orderStatus
List
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"入仓箱数"
align=
"center"
prop=
"sumNum"
/>
<el-table-column
label=
"入仓方数"
align=
"center"
prop=
"sumVolume"
/>
<el-table-column
label=
"入仓重量"
align=
"center"
prop=
"sumWeight"
/>
<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"
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:order:update']"
>
修改
</el-button>
v-hasPermi=
"['ecw:order:update']"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:order:update']"
>
退仓
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:order:delete']"
>
删除
</el-button>
v-hasPermi=
"['ecw:order: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"
/>
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
...
...
@@ -96,13 +148,13 @@
<el-input
v-model=
"form.marks"
placeholder=
"请输入唛头"
/>
</el-form-item>
<el-form-item
label=
"产品备案属性"
prop=
"productRecord"
>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"form.productRecord"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"form.productRecord"
clearable
/>
</el-form-item>
<el-form-item
label=
"控货状态"
prop=
"cargoControlStatus"
>
<dict-selector
:type=
"DICT_TYPE.CONTROL_GOODS_STATUS"
v-model=
"form.cargoControlStatus"
clearable
/>
</el-form-item>
<el-form-item
label=
"报关类别"
prop=
"customsType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.customsType"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.customsType"
clearable
/>
</el-form-item>
<el-form-item
label=
"入仓箱数"
prop=
"sumNum"
>
...
...
@@ -124,26 +176,43 @@
</template>
<
script
>
import
Selector
from
'
@/components/Selector
'
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
getProductAttrList
}
from
'
@/api/ecw/productAttr
'
import
CustomerSelector
from
'
@/components/CustomerSelector
'
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
{
createOrder
,
updateOrder
,
deleteOrder
,
getOrder
,
getOrderPage
,
exportOrderExcel
}
from
"
@/api/ecw/order
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
export
default
{
name
:
"
Order
"
,
components
:
{
CustomerSelector
,
ProductSelector
,
Selector
},
filters
:{
cargoControlStatusFilter
(
e
,
cargoControlStatusList
)
{
if
(
e
)
return
cargoControlStatusList
.
find
(
item
=>
item
.
value
==
e
).
label
filters
:
{
cargoControlStatusFilter
(
e
,
cargoControlStatusList
)
{
if
(
e
)
return
cargoControlStatusList
.
find
(
item
=>
item
.
value
==
e
).
label
},
recordFilter
(
e
,
productRecordList
)
{
if
(
e
)
return
productRecordList
.
find
(
item
=>
item
.
value
==
e
).
label
},
recordFilter
(
e
,
productRecord
List
)
{
if
(
e
)
return
productRecordList
.
find
(
item
=>
item
.
value
==
e
).
label
customsTypeFilter
(
e
,
customsType
List
)
{
if
(
e
)
return
customsTypeList
.
find
(
item
=>
item
.
value
==
e
).
label
},
customsTypeFilter
(
e
,
customsTypeList
)
{
if
(
e
)
return
customsTypeList
.
find
(
item
=>
item
.
value
==
e
).
label
orderStatusFilter
(
e
,
orderStatusList
)
{
if
(
e
)
return
orderStatusList
.
find
(
item
=>
item
.
value
==
e
)
?
orderStatusList
.
find
(
item
=>
item
.
value
==
e
).
label
:
''
},
transportFilter
(
e
,
transportList
)
{
if
(
e
)
return
transportList
.
find
(
item
=>
item
.
value
==
e
).
label
}
},
data
()
{
return
{
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
...
...
@@ -236,18 +305,35 @@ export default {
},
productRecordList
:
getDictDatas
(
DICT_TYPE
.
PRODUCT_RECORD_ATTRIBUTE
),
cargoControlStatusList
:
getDictDatas
(
DICT_TYPE
.
CONTROL_GOODS_STATUS
),
customsTypeList
:
getDictDatas
(
DICT_TYPE
.
ECW_CUSTOMS_TYPE
)
customsTypeList
:
getDictDatas
(
DICT_TYPE
.
ECW_CUSTOMS_TYPE
),
orderStatusList
:
getDictDatas
(
DICT_TYPE
.
PAY_ORDER_STATUS
),
transportList
:
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
tradeCityList
:
[],
productAttrList
:
[],
// 商品属性
molecule
:
''
,
//重货比分子
denominator
:
''
//重货比分母
};
},
computed
:
{
expoerCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
},
importCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
}
},
created
()
{
this
.
getList
();
getProductAttrList
().
then
(
res
=>
this
.
productAttrList
=
res
.
data
)
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
let
params
=
{
...
this
.
queryParams
};
console
.
log
(
'
params
'
,
params
)
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeRucangtime
,
'
rucangtime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeDaogangtime
,
'
daogangtime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeQingguantime
,
'
qingguantime
'
);
...
...
@@ -398,17 +484,17 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
orderId
=
row
.
orderId
;
this
.
$modal
.
confirm
(
'
是否确认删除订单编号为"
'
+
orderId
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteOrder
(
orderId
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{
});
this
.
$modal
.
confirm
(
'
是否确认删除订单编号为"
'
+
orderId
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteOrder
(
orderId
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{
...
this
.
queryParams
};
let
params
=
{
...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeRucangtime
,
'
rucangtime
'
);
...
...
@@ -422,13 +508,22 @@ export default {
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有订单数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportOrderExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
this
.
exportLoading
=
true
;
return
exportOrderExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
},
// 表格多选
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
handleEdit
()
{
},
moleculeChange
()
{
},
denominatorChange
()
{
}
}
};
</
script
>
src/views/ecw/productPrice/edit.vue
View file @
ad478141
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-input
v-if=
"productDisabled && productType"
:value=
"productType.titleZh"
disabled
/>
<el-select
v-if=
"!productDisabled"
v-model=
"form.productType"
>
<el-option
v-for=
"type in productTypeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-if=
"productDisabled"
:value=
"product ? product.titleZh:null"
disabled
/>
<product-selector
v-else
v-model=
"form.productId"
:product-type=
"form.productType"
@
change=
"product=$event"
/>
</el-form-item>
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"英文名称"
prop=
"titleEn"
>
<el-input
:value=
"product ? product.titleEn : ''"
disabled
/>
</el-form-item>
<el-form-item
label=
"路线"
v-if=
"form.warehouseLineDO"
>
<el-input
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, form.warehouseLineDO.transportType) + '】从【'+form.warehouseLineDO.startTitleZh+'】发往【'+form.warehouseLineDO.destTitleZh+'】'"
disabled
/>
</el-form-item>
<routers-selector
v-if=
"!form.id"
v-model=
"selectedRoutes"
/>
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
价格设置
</div>
<el-form-item
label=
"默认运费"
prop=
"transportPrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"form.transportPriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.transportPriceUnit"
>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-input
v-if=
"productDisabled && productType"
:value=
"productType.titleZh"
disabled
/>
<el-select
v-if=
"!productDisabled"
v-model=
"form.productType"
>
<el-option
v-for=
"type in productTypeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-if=
"productDisabled"
:value=
"product ? product.titleZh : null"
disabled
/>
<product-selector
v-else
v-model=
"form.productId"
:product-type=
"form.productType"
@
change=
"product = $event"
/>
</el-form-item>
<el-form-item
label=
"英文名称"
prop=
"titleEn"
>
<el-input
:value=
"product ? product.titleEn : ''"
disabled
/>
</el-form-item>
<el-form-item
label=
"路线"
prop=
"lineChannelList"
v-if=
"lineList && lineList.length == 1"
>
<el-input
v-for=
"item in lineList"
:value=
"'【' + getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType) + '】从【' + item.warehouseLineDO.startTitleZh + '】发往【' + item.warehouseLineDO.destTitleZh + '】'"
disabled
/>
</el-form-item>
<el-form-item
label=
"路线"
prop=
"lineChannelList"
v-else
>
<el-checkbox-group
v-model=
"checkList"
>
<el-checkbox
v-for=
"item in lineList"
:label=
"item.id"
>
{{
'
【
'
+
getDictDataLabel
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
,
item
.
warehouseLineDO
.
transportType
)
+
'
】从【
'
+
item
.
warehouseLineDO
.
startTitleZh
+
'
】发往【
'
+
item
.
warehouseLineDO
.
destTitleZh
+
'
】
'
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<routers-selector
v-if=
"!form.id"
v-model=
"selectedRoutes"
/>
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
价格设置
</div>
<el-form-item
label=
"默认运费"
prop=
"transportPrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"form.transportPriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.transportPriceUnit"
>
<el-option
v-for=
"currency in currencyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
-->
</el-col>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"form.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"form.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
/
<selector
v-model=
"form.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.transportVolumeUnit"
>
<el-col
:span=
"4"
>
/
<selector
v-model=
"form.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.transportVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
-->
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"默认清关费"
prop=
"clearancePrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"form.clearancePriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.clearancePriceUnit"
>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"默认清关费"
prop=
"clearancePrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"form.clearancePriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.clearancePriceUnit"
>
<el-option
v-for=
"currency in currencyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
-->
</el-col>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"form.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"form.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
/
<selector
v-model=
"form.clearanceVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.clearanceVolumeUnit"
>
<el-col
:span=
"4"
>
/
<selector
v-model=
"form.clearanceVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"form.clearanceVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
-->
</el-col>
</el-row>
</el-form-item>
<template
v-for=
"(special, specialIndex) in this.specialProducts"
>
<el-form-item
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '运费'"
:key=
"specialIndex + 'transport'"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"special.transportPriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.transportPriceUnit"
>
</el-col>
</el-row>
</el-form-item>
<template
v-for=
"(special, specialIndex) in this.specialProducts"
>
<el-form-item
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '运费'"
:key=
"specialIndex + 'transport'"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"special.transportPriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.transportPriceUnit"
>
<el-option
v-for=
"currency in currencyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
-->
</el-col>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"special.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"special.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
/
<selector
v-model=
"special.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<el-col
:span=
"4"
>
/
<selector
v-model=
"special.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.transportVolumeUnit"
>
<!--
<el-select
v-model=
"special.transportVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
-->
</el-col>
</el-row>
</el-form-item>
<el-form-item
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '清关费'"
:key=
"specialIndex + 'clearance'"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"special.clearancePriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.clearancePriceUnit"
>
</el-col>
</el-row>
</el-form-item>
<el-form-item
:label=
"getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + '清关费'"
:key=
"specialIndex + 'clearance'"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<selector
v-model=
"special.clearancePriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.clearancePriceUnit"
>
<el-option
v-for=
"currency in currencyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
-->
</el-col>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"special.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"6"
>
<inputor
default=
"0"
v-model.number=
"special.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
/
<selector
v-model=
"special.clearanceVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.clearanceVolumeUnit"
>
<el-col
:span=
"4"
>
/
<selector
v-model=
"special.clearanceVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<el-select
v-model=
"special.clearanceVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
-->
</el-col>
</el-row>
</el-form-item>
</
template
>
<el-form-item
label=
"是否预付"
prop=
"advanceStatus"
>
<dict-selector
form-type=
"radio"
:type=
"DICT_TYPE.ADVANCE_STATUS"
v-model=
"form.advanceStatus"
/>
<!-- <el-radio-group v-model="form.advanceStatus">
</el-col>
</el-row>
</el-form-item>
</
template
>
<el-form-item
label=
"是否预付"
prop=
"advanceStatus"
>
<dict-selector
form-type=
"radio"
:type=
"DICT_TYPE.ADVANCE_STATUS"
v-model=
"form.advanceStatus"
/>
<!-- <el-radio-group v-model="form.advanceStatus">
<el-radio v-for="advanceDict in advanceStatusDictDatas" :key="advanceDict.value" :label="parseInt(advanceDict.value)">{{advanceDict.label}}</el-radio>
</el-radio-group> -->
</el-form-item>
</el-card>
</el-form-item>
</el-card>
<el-card>
<div
slot=
"header"
style=
"font-size:20px;"
>
基础信息
</div>
<el-card>
<div
slot=
"header"
style=
"font-size:20px;"
>
基础信息
</div>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"每日入仓上限"
prop=
"dayLimit"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
style=
"width:100px"
/>
立方米
</el-form-item>
<el-form-item
label=
"每日入仓上限"
prop=
"dayLimit"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
style=
"width:100px"
/>
立方米
</el-form-item>
<el-form-item
label=
"货柜位置"
prop=
"containerLocation"
>
<!-- <el-select v-model="form.containerLocation" placeholder="选择货柜位置" clearable>
<el-form-item
label=
"货柜位置"
prop=
"containerLocation"
>
<!-- <el-select v-model="form.containerLocation" placeholder="选择货柜位置" clearable>
<el-option v-for="locationItem in locationList" :key="locationItem.value" :label="locationItem.label" :value="locationItem.value"/>
</el-select> -->
<dict-selector
:type=
"DICT_TYPE.ECW_CONTAINER_LOCATION"
v-model=
"form.containerLocation"
/>
</el-form-item>
<dict-selector
:type=
"DICT_TYPE.ECW_CONTAINER_LOCATION"
v-model=
"form.containerLocation"
/>
</el-form-item>
<el-form-item
label=
"方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
style=
"width:200px"
/>
</el-form-item>
</el-card>
<el-form-item
label=
"方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
style=
"width:200px"
/>
</el-form-item>
</el-card>
</el-form>
<div
style=
"margin: 20px 0"
>
<el-button
@
click=
"submitForm"
type=
"primary"
>
确认提交
</el-button>
<el-button
type=
"default"
@
click=
"$router.back"
>
返回上一页
</el-button>
</div>
</el-form>
<div
style=
"margin: 20px 0"
>
<el-button
@
click=
"submitForm"
type=
"primary"
>
确认提交
</el-button>
<el-button
type=
"default"
@
click=
"$router.back"
>
返回上一页
</el-button>
</div>
</div>
</template>
<
script
>
import
RoutersSelector
from
'
@/components/RoutersSelector
'
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
createProductPrice
,
updateProductPrice
,
batchUpdateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPriceList
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
getProduct
}
from
'
@/api/ecw/product
'
import
{
getProductType
,
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
Selector
from
'
@/components/Selector
'
import
Inputor
from
'
@/components/Inputor
'
export
default
{
components
:
{
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
},
data
(){
return
{
selectedRoutes
:
[],
// 勾选的路线渠道
form
:{},
specialProducts
:
[],
// specialList:[], // 特殊需求,默认四个
rules
:
{
/* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }],
titleZh: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }], */
transportPrice
:
[{
required
:
true
,
message
:
"
海运费不能为空
"
,
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
"
清关费不能为空
"
,
trigger
:
"
blur
"
}],
advanceStatus
:
[{
required
:
true
,
message
:
"
是否预付不能为空
"
,
trigger
:
"
blur
"
}],
containerLocation
:[{
required
:
true
,
message
:
"
货柜位置不能为空
"
,
trigger
:
"
blur
"
}],
square
:[{
required
:
true
,
message
:
"
方数不能为空
"
,
trigger
:
"
blur
"
}],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
// paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }],
needBook
:[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
},
product
:
null
,
productType
:
null
,
currencyList
:[],
unitList
:[],
productTypeList
:[],
productDisabled
:
true
}
components
:
{
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
},
data
()
{
return
{
checkList
:
[],
selectedRoutes
:
[],
// 勾选的路线渠道
form
:
{},
specialProducts
:
[],
// specialList:[], // 特殊需求,默认四个
rules
:
{
/* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }],
titleZh: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }], */
transportPrice
:
[{
required
:
true
,
message
:
"
海运费不能为空
"
,
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
"
清关费不能为空
"
,
trigger
:
"
blur
"
}],
advanceStatus
:
[{
required
:
true
,
message
:
"
是否预付不能为空
"
,
trigger
:
"
blur
"
}],
containerLocation
:
[{
required
:
true
,
message
:
"
货柜位置不能为空
"
,
trigger
:
"
blur
"
}],
square
:
[{
required
:
true
,
message
:
"
方数不能为空
"
,
trigger
:
"
blur
"
}],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
// paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }],
needBook
:
[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
},
product
:
null
,
productType
:
null
,
currencyList
:
[],
unitList
:
[],
productTypeList
:
[],
productDisabled
:
true
,
lineList
:
[]
//路线数组
}
},
computed
:
{
},
watch
:
{
checkList
()
{
//选择路线
if
(
this
.
checkList
.
length
>
0
)
{
this
.
form
.
lineChannelList
=
this
.
checkList
.
map
(
item
=>
{
return
{
lineId
:
item
,
shippingChannelId
:
0
}
})
}
else
{
this
.
form
.
lineChannelList
=
[]
}
},
computed
:{
product
()
{
getProductType
(
this
.
product
.
typeId
).
then
(
res
=>
{
this
.
productType
=
res
.
data
})
},
watch
:{
product
(){
getProductType
(
this
.
product
.
typeId
).
then
(
res
=>
{
this
.
productType
=
res
.
data
})
},
form
(
val
){
if
(
!
val
)
return
// 特殊需求回显
if
(
val
.
specialList
){
let
keyed
=
arrryToKeyedObjectBy
(
val
.
specialList
,
'
specialDictType
'
)
console
.
log
(
keyed
)
this
.
specialProducts
.
map
((
item
,
index
)
=>
{
if
(
keyed
[
item
.
specialDictType
]){
for
(
let
field
in
item
){
if
(
keyed
[
item
.
specialDictType
][
field
]){
item
[
field
]
=
keyed
[
item
.
specialDictType
][
field
]
}
}
}
/* clearancePric
clearancePriceUnit,
clearanceVolumeUnit,
specialDictType,
transportPrice,
transportPriceUnit,
transportVolumeUnit, */
})
form
(
val
)
{
if
(
!
val
)
return
// 特殊需求回显
if
(
val
.
specialList
)
{
let
keyed
=
arrryToKeyedObjectBy
(
val
.
specialList
,
'
specialDictType
'
)
this
.
specialProducts
.
map
((
item
,
index
)
=>
{
if
(
keyed
[
item
.
specialDictType
])
{
for
(
let
field
in
item
)
{
if
(
keyed
[
item
.
specialDictType
][
field
])
{
item
[
field
]
=
keyed
[
item
.
specialDictType
][
field
]
}
}
},
selectedRoutes
(
routers
){
routers
.
forEach
(
item
=>
{
item
.
shippingChannelId
=
item
.
channelId
})
}
}
/* clearancePric
clearancePriceUnit,
clearanceVolumeUnit,
specialDictType,
transportPrice,
transportPriceUnit,
transportVolumeUnit, */
})
}
},
created
(){
// 修改回显
if
(
this
.
$route
.
query
.
id
){
getProductPrice
(
this
.
$route
.
query
.
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
product
=
res
.
data
.
productDO
/* getProduct(res.data.productId).then(res => {
this.product = res.data
}) */
})
}
// 指定产品
else
if
(
this
.
$route
.
query
.
product_id
){
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
})
selectedRoutes
(
routers
)
{
routers
.
forEach
(
item
=>
{
item
.
shippingChannelId
=
item
.
channelId
})
}
},
async
created
()
{
// 修改回显
if
(
this
.
$route
.
query
.
id
)
{
getProductPrice
(
12
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
product
=
res
.
data
.
productDO
/* getProduct(res.data.productId).then(res => {
this.product = res.data
}) */
})
let
query
=
{
ids
:
this
.
$route
.
query
.
id
}
getProductPriceList
(
query
).
then
(
res
=>
{
this
.
form
=
res
.
data
[
0
]
this
.
lineList
=
res
.
data
})
// this.form =newdata[newdata.length-1]
// this.product = newdata[newdata.length-1].productDO
}
// 指定产品
else
if
(
this
.
$route
.
query
.
product_id
)
{
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
})
}
// 获取类型列表
else
{
this
.
productDisabled
=
false
getProductTypeList
().
then
(
res
=>
this
.
productTypeList
=
res
.
data
)
}
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
this
.
specialProducts
.
push
({
"
clearancePrice
"
:
null
,
"
clearancePriceUnit
"
:
null
,
"
clearanceVolumeUnit
"
:
null
,
"
specialDictType
"
:
item
.
value
,
"
transportPrice
"
:
null
,
"
transportPriceUnit
"
:
null
,
"
transportVolumeUnit
"
:
null
,
})
})
},
methods
:
{
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 获取类型列表
else
{
this
.
productDisabled
=
false
getProductTypeList
().
then
(
res
=>
this
.
productTypeList
=
res
.
data
)
// 只有新增的时候做判断
if
(
!
this
.
form
.
id
&&
(
!
this
.
selectedRoutes
||
!
this
.
selectedRoutes
.
length
))
{
this
.
$message
.
error
(
'
请选择线路
'
);
return
;
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
lineChannelList
:
this
.
selectedRoutes
,
specialList
:
this
.
specialProducts
})
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS
).
forEach
(
item
=>
{
console
.
log
(
item
,
this
.
getDictDataLabel
(
item
.
value
))
this
.
specialProducts
.
push
({
"
clearancePrice
"
:
null
,
"
clearancePriceUnit
"
:
null
,
"
clearanceVolumeUnit
"
:
null
,
"
specialDictType
"
:
item
.
value
,
"
transportPrice
"
:
null
,
"
transportPriceUnit
"
:
null
,
"
transportVolumeUnit
"
:
null
,
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
lineList
.
length
>
1
)
{
//批量修改
batchUpdateProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
})
})
}
else
{
updateProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
})
}
return
;
}
// 添加的提交
data
.
productId
=
this
.
product
.
id
;
data
.
lineChannelList
=
this
.
selectedRoutes
createProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
});
});
},
methods
:{
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 只有新增的时候做判断
if
(
!
this
.
form
.
id
&&
(
!
this
.
selectedRoutes
||
!
this
.
selectedRoutes
.
length
))
{
this
.
$message
.
error
(
'
请选择线路
'
);
return
;
}
let
data
=
Object
.
assign
({},
this
.
form
,
{
// lineChannelList: this.selectedRoutes,
specialList
:
this
.
specialProducts
})
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
});
return
;
}
// 添加的提交
data
.
productId
=
this
.
product
.
id
;
data
.
lineChannelList
=
this
.
selectedRoutes
createProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
});
});
},
}
}
}
</
script
>
\ No newline at end of file
src/views/ecw/productPrice/index.vue
View file @
ad478141
...
...
@@ -60,8 +60,10 @@
<!-- 操作工具栏 -->
<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:product-price:create']"
>
新增
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:product-price:create']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleEdit"
:disabled=
"multiple"
v-hasPermi=
"['ecw:product:attr']"
>
批量设置路线
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
...
...
@@ -71,7 +73,8 @@
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<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=
"序号"
prop=
"id"
width=
"50"
/>
<el-table-column
label=
"商品编码"
align=
"center"
prop=
"productCode"
>
...
...
@@ -347,6 +350,12 @@ export default {
},
data
()
{
return
{
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
//特性列表
attrList
:[],
typeList
:
[],
...
...
@@ -708,6 +717,10 @@ export default {
this
.
open
=
true
;
this
.
title
=
"
添加路线价格
"
;
},
// 批量设置路线
handleEdit
()
{
this
.
$router
.
push
(
'
product-price/edit?id=
'
+
this
.
ids
)
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
return
this
.
$router
.
push
(
'
product-price/edit?id=
'
+
row
.
id
)
...
...
@@ -826,6 +839,12 @@ export default {
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
// 表格多选
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
}
};
...
...
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