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
ff6c4f83
Commit
ff6c4f83
authored
Aug 17, 2022
by
huyf
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
57295901
bba4cf02
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
382 additions
and
192 deletions
+382
-192
App.vue
src/App.vue
+15
-0
order.js
src/api/ecw/order.js
+0
-9
orderCargoControl.js
src/api/ecw/orderCargoControl.js
+28
-0
dict.js
src/utils/dict.js
+1
-0
cargoControl.vue
src/views/ecw/order/cargoControl.vue
+4
-10
cargoControlDetail.vue
src/views/ecw/order/cargoControlDetail.vue
+3
-18
SendSmsCode.vue
src/views/ecw/order/components/SendSmsCode.vue
+55
-0
Transfer.vue
src/views/ecw/order/components/Transfer.vue
+63
-31
edit.vue
src/views/ecw/order/edit.vue
+8
-2
index.vue
src/views/ecw/order/index.vue
+18
-15
edit.vue
src/views/ecw/productPrice/edit.vue
+110
-53
index.vue
src/views/ecw/productPrice/index.vue
+77
-54
No files found.
src/App.vue
View file @
ff6c4f83
...
...
@@ -17,3 +17,18 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
>
.page-title
{
font-size
:
16px
;
margin
:
20px
0
;
display
:flex
;
align-items
:center
;
&
:before
{
content
:
''
;
width
:
5px
;
height
:
15px
;
background
:
#666
;
margin-right
:
10px
;
}
}
</
style
>
src/api/ecw/order.js
View file @
ff6c4f83
...
...
@@ -249,15 +249,6 @@ export function feeApplicationGet(params){
})
}
// 获得控货分页
export
function
getCargoControlOrderPage
(
params
){
return
request
({
url
:
'
ecw/order-cargo-control/cargo/control/order
'
,
method
:
'
get
'
,
params
})
}
//获得调仓明细
export
function
orderWarehouseInGetAdjustInfo
(
params
){
return
request
({
...
...
src/api/ecw/orderCargoControl.js
0 → 100644
View file @
ff6c4f83
import
request
from
'
@/utils/request
'
// 获得控货分页
export
function
getCargoControlOrderPage
(
params
){
return
request
({
url
:
'
ecw/order-cargo-control/cargo/control/order
'
,
method
:
'
get
'
,
params
})
}
// 发送手机验证码
export
function
sendSmsCode
(
data
){
return
request
({
url
:
'
/ecw/order-cargo-control/send-sms-code
'
,
method
:
'
post
'
,
data
})
}
// 创建订单控货人信息
export
function
create
(
data
){
return
request
({
url
:
'
/ecw/order-cargo-control/create
'
,
method
:
'
post
'
,
data
})
}
\ No newline at end of file
src/utils/dict.js
View file @
ff6c4f83
...
...
@@ -103,6 +103,7 @@ export const DICT_TYPE = {
ECW_BEGINTIME_TYPE_ENDTIME
:
'
begintime_type_endtime
'
,
// 时间筛选字段(订单)
ECW_CUSTOM_DRAWEE
:
'
custom_drawee
'
,
// 自定义付款人费用类型
ECW_IS_DRAFT
:
'
is_draft
'
,
// 草稿发布状态
ECW_PRICE_TYPE
:
'
price_type
'
,
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_SOURCE
:
'
customer_source
'
,
...
...
src/views/ecw/order/cargoControl.vue
View file @
ff6c4f83
...
...
@@ -113,7 +113,7 @@
<el-button
type=
"text"
size=
"mini"
@
click=
"$router.push('detail?id=' + scope.row.orderId)"
>
查看
</el-button>
<el-button
type=
"text"
size=
"mini"
>
调货
</el-button>
<el-button
type=
"text"
size=
"mini"
>
反复核
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"showTransferOrder
Id = scope.row.orderId
"
>
控货权转移
</el-button>
<el-button
type=
"text"
size=
"mini"
@
click=
"showTransferOrder
= scope.row
"
>
控货权转移
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -121,7 +121,7 @@
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<transfer
v-if=
"showTransferOrder
Id"
:order-id=
"showTransferOrderId"
@
close=
"showTransferOrderId
=null"
/>
<transfer
v-if=
"showTransferOrder
"
v-bind=
"showTransferOrder"
@
close=
"showTransferOrder
=null"
/>
<release
v-if=
"showReleaseOrderId"
:order-id=
"showReleaseOrderId"
@
close=
"showReleaseOrderId=null"
/>
<release
v-if=
"showEditOrderId"
:order-id=
"showEditOrderId"
@
close=
"showEditOrderId=null"
/>
</div>
...
...
@@ -132,17 +132,11 @@ 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
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
Transfer
from
'
@/views/ecw/order/components/Transfer
'
import
Release
from
'
./components/Release
'
import
CargoControlEdit
from
'
./components/CargoControlEdit
'
import
{
getOrder
,
getOrderPage
,
exportOrderExcel
,
getCargoControlOrderPage
}
from
"
@/api/ecw/order
"
;
import
{
getCargoControlOrderPage
}
from
"
@/api/ecw/orderCargoControl
"
export
default
{
...
...
@@ -181,7 +175,7 @@ export default {
denominator
:
''
,
//重货比分母
dateFilterType
:
''
,
//日期筛选类别
dateFilter
:
[],
//筛选日期
showTransferOrder
Id
:
null
,
// 控制权转移操作订单
showTransferOrder
:
null
,
// 控制权转移操作订单
showReleaseOrderId
:
null
,
// 放货ID
showEditOrderId
:
null
,
// 修改ID
};
...
...
src/views/ecw/order/cargoControlDetail.vue
View file @
ff6c4f83
<
template
>
<div
class=
"app-container"
>
<div
class=
"title"
>
控货订单
</div>
<div
class=
"
page-
title"
>
控货订单
</div>
<el-form
ref=
"elForm"
:model=
"formData"
:rules=
"rules"
size=
"small"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"6"
>
...
...
@@ -36,7 +36,7 @@
</el-row>
</el-form>
<div
class=
"title"
>
放货详情
</div>
<div
class=
"
page-
title"
>
放货详情
</div>
<el-table
:data=
"[1]"
border
>
<el-table-column
label=
"序号"
width=
"50px"
>
...
...
@@ -77,7 +77,7 @@
</el-table-column>
</el-table>
<div
class=
"title"
>
历史放货记录
</div>
<div
class=
"
page-
title"
>
历史放货记录
</div>
<el-table
:data=
"[1]"
border
>
<el-table-column
label=
"序号"
width=
"50px"
>
...
...
@@ -131,18 +131,3 @@ export default {
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.title
{
font-size
:
16px
;
margin
:
20px
0
;
display
:flex
;
align-items
:center
;
&
:before
{
content
:
''
;
width
:
5px
;
height
:
15px
;
background
:
#666
;
margin-right
:
10px
;
}
}
</
style
>
src/views/ecw/order/components/SendSmsCode.vue
0 → 100644
View file @
ff6c4f83
<
template
>
<span
@
click=
"send"
>
{{
text
}}
</span>
</
template
>
<
script
>
import
{
sendSmsCode
}
from
'
@/api/ecw/orderCargoControl
'
const
timeout
=
null
export
default
{
props
:{
orderId
:
[
String
,
Number
],
scene
:
[
String
,
Number
]
},
data
(){
return
{
leftTime
:
60
,
loading
:
false
}
},
computed
:{
text
(){
if
(
this
.
leftTime
===
60
){
return
'
发送验证码
'
}
if
(
this
.
leftTime
>
0
){
return
this
.
leftTime
+
'
秒
'
}
return
'
重新发送
'
}
},
destroyed
(){
if
(
timeout
)
clearTimeout
(
timeout
)
},
methods
:{
send
(){
if
(
this
.
loading
||
(
this
.
leftTime
>
0
&&
this
.
leftTime
<
60
))
return
false
this
.
loading
=
true
sendSmsCode
({
orderId
:
this
.
orderId
,
scene
:
this
.
scene
}).
then
(
res
=>
{
this
.
$message
.
success
(
'
发送成功
'
)
this
.
countDown
()
}).
finally
(
res
=>
{
this
.
loading
=
false
})
},
countDown
(){
this
.
leftTime
--
if
(
this
.
leftTime
<=
0
){
return
false
}
timeout
=
setTimeout
(
this
.
countDown
,
1000
)
}
}
}
</
script
>
\ No newline at end of file
src/views/ecw/order/components/Transfer.vue
View file @
ff6c4f83
<
template
>
<el-dialog
:title=
"title"
visible
:before-close=
"closeDialog"
>
<el-dialog
:title=
"title"
visible
:before-close=
"closeDialog"
:close-on-click-modal=
"false"
>
<div
class=
""
v-if=
"agreement"
>
<el-form
ref=
"form"
:model=
"form"
label-position=
"left"
label-width=
"120px"
>
<el-form-item
v-if=
"detail"
label=
"原控货人"
>
<el-input
v-model=
"
detail.orderNo
"
readonly
></el-input>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-position=
"left"
label-width=
"120px"
>
<el-form-item
label=
"原控货人"
>
<el-input
v-model=
"
cargoControlName
"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"原控货手机号"
prop=
"start"
required
>
<el-input
v-model
.number=
"form.start"
type=
"number"
></el-input>
<el-form-item
label=
"原控货手机号"
>
<el-input
v-model
=
"cargoControlPhone"
readonly
></el-input>
</el-form-item>
<el-form-item
label=
"新控货人"
prop=
"end"
required
>
<el-input
v-model.number=
"form.end"
type=
"number"
:max=
"detail ? detail.num : 1"
></el-input>
<el-form-item
label=
"新控货人"
prop=
"name"
>
<el-input
v-model=
"form.name"
></el-input>
</el-form-item>
<el-form-item
label=
"新控货手机号"
prop=
"
start"
required
>
<el-input
v-model
.number=
"form.start"
type=
"number
"
>
<el-select
slot=
"prepend"
v-model=
"form.
areaCode"
placeholder=
"
"
>
<el-option
:label=
"1"
:value=
"1
"
></el-option>
<el-form-item
label=
"新控货手机号"
prop=
"
phone"
>
<el-input
v-model
=
"form.phone"
type=
"tel
"
>
<el-select
slot=
"prepend"
v-model=
"form.
dialCode"
placeholder=
""
style=
"width:200px
"
>
<el-option
v-for=
"item in countryList"
:key=
"item.id"
:label=
"item.nameZh + item.tel"
:value=
"item.tel.replace('+', '')
"
></el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item
label=
"新控货人邮箱"
prop=
"e
nd"
required
>
<el-input
v-model
.number=
"form.end"
type=
"number"
:max=
"detail ? detail.num : 1
"
></el-input>
<el-form-item
label=
"新控货人邮箱"
prop=
"e
mail"
>
<el-input
v-model
=
"form.email"
type=
"email
"
></el-input>
</el-form-item>
<el-form-item
label=
"手机验证码"
prop=
"
end"
required
>
<el-input
v-model.number=
"form.
end
"
type=
"number"
>
<s
pan
slot=
"append"
>
获取验证码
</span
>
<el-form-item
label=
"手机验证码"
prop=
"
code"
>
<el-input
v-model.number=
"form.
code
"
type=
"number"
>
<s
end-sms-code
slot=
"append"
:order-id=
"orderId"
scene=
"4"
/
>
</el-input>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"primary"
@
click=
"s
howPreview
"
>
确定转移
</el-button>
<el-button
type=
"primary"
@
click=
"s
ubmit
"
>
确定转移
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -42,41 +43,72 @@
</
template
>
<
script
>
import
TransferAgreement
from
"
./TransferAgreement
"
import
{
getCountryListAll
}
from
'
@/api/ecw/country
'
import
SendSmsCode
from
'
./SendSmsCode
'
import
{
create
}
from
'
@/api/ecw/orderCargoControl
'
export
default
{
props
:{
orderId
:
[
String
,
Number
]
orderId
:
[
String
,
Number
],
cargoControlName
:
String
,
cargoControlPhone
:
String
,
orderNo
:
String
},
components
:
{
TransferAgreement
},
components
:
{
TransferAgreement
,
SendSmsCode
},
data
(){
return
{
show
:
false
,
detail
:
null
,
//
detail: null,
form
:{},
agreement
:
false
,
// 是否同意协议
countryList
:
[],
rules
:{
name
:
[{
required
:
true
,
message
:
'
请输入控货人
'
}],
phone
:
[{
required
:
true
,
message
:
'
请输入控货人手机
'
}],
// email: [{required: true, message: '请输入控货人'}],
code
:
[{
required
:
true
,
message
:
'
验证码不能为空
'
}]
}
}
},
computed
:{
title
(){
let
t
=
'
控货权转移
'
if
(
this
.
detail
){
t
+=
'
-
'
+
this
.
detail
.
orderNo
return
this
.
orderNo
}
},
watch
:{
countryList
(){
if
(
this
.
countryList
.
length
){
this
.
$set
(
this
.
form
,
'
dialCode
'
,
this
.
countryList
[
0
].
tel
.
replace
(
'
+
'
,
''
))
}
return
t
}
},
created
(){
this
.
show
=
true
this
.
loadData
()
getCountryListAll
().
then
(
res
=>
{
this
.
countryList
=
res
.
data
})
},
methods
:{
loadData
(){
},
closeDialog
(){
this
.
show
=
false
this
.
$emit
(
'
close
'
);
},
submit
(){
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
!
valid
){
return
false
}
let
data
=
Object
.
assign
({
orderId
:
this
.
orderId
,
orderNo
:
this
.
orderNo
},
this
.
form
)
create
(
data
)
.
then
(
res
=>
{
this
.
$message
.
success
(
res
.
message
||
'
操作成功
'
)
this
.
closeDialog
()
})
})
}
}
}
</
script
>
\ No newline at end of file
src/views/ecw/order/edit.vue
View file @
ff6c4f83
...
...
@@ -278,7 +278,7 @@
<el-input
v-model=
"form.marks"
placeholder=
""
></el-input>
</el-descriptions-item>
<el-descriptions-item
label=
"是否控货"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
v-model=
"form.
c
ontrol"
form-type=
"radio"
/>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
formatter=
"bool"
v-model=
"form.
isCargoC
ontrol"
form-type=
"radio"
/>
</el-descriptions-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item
label=
"是否代收货款"
>
...
...
@@ -527,7 +527,13 @@ export default {
this
.
getOpenedRouterList
()
},
'
form.transportId
'
(){
this
.
getOpenedRouterList
this
.
getOpenedRouterList
()
},
'
form.lineId
'
(
lineId
){
let
router
=
this
.
routerList
.
find
(
item
=>
item
.
id
==
lineId
)
this
.
$set
(
this
.
form
,
'
departureId
'
,
router
.
startCityId
)
this
.
$set
(
this
.
form
,
'
objectiveId
'
,
router
.
destCityId
)
// TODO 还需要回填渠道信息,暂时缺少渠道ID
},
/* // 发货联系人发生变化获取发货客户
consignorContact(){
...
...
src/views/ecw/order/index.vue
View file @
ff6c4f83
...
...
@@ -3,12 +3,12 @@
<!-- 搜索工作栏 -->
<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-form-item
label=
"编号"
prop=
"orderNo"
>
<el-input
v-model=
"queryParams.orderNo"
placeholder=
"
请输入订单号、唛头、提单
号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"唛头"
prop=
"marks"
>
<
!--
<
el-form-item
label=
"唛头"
prop=
"marks"
>
<el-input
v-model=
"queryParams.marks"
placeholder=
"唛头"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"发货人"
prop=
"consignorId"
>
<el-input
v-model=
"queryParams.consignorId"
placeholder=
"发货人"
clearable
@
keyup.enter.native=
"handleQuery"
/>
...
...
@@ -17,8 +17,8 @@
<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=
"
日期筛选
"
>
<dict-selector
:type=
"DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME"
v-model=
"dateFilterType"
style=
"width: 150px; margin-right: 5px"
/>
<el-form-item
label=
""
>
<dict-selector
:type=
"DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME"
v-model=
"dateFilterType"
defaultable
style=
"width: 150px; margin-right: 5px"
/>
<el-date-picker
v-model=
"dateFilter"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
...
...
@@ -37,7 +37,7 @@
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
formatter=
"number"
/>
</el-form-item>
<el-form-item
label=
"商品分类"
prop=
"goodsType"
>
<
!--
<
el-form-item
label=
"商品分类"
prop=
"goodsType"
>
<selector
v-model=
"queryParams.goodsType"
:options=
"productAttrList"
label-field=
"attrName"
value-field=
"id"
>
</selector>
</el-form-item>
...
...
@@ -47,9 +47,10 @@
<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=
"tidanNo"
>
<el-input
v-model=
"queryParams.tidanNo"
placeholder=
"提单号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
-->
<el-form-item
label=
"商品"
prop=
"tidanNo"
>
<el-input
v-model=
"queryParams.product"
placeholder=
"请输入商品类型、品名或品牌"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"控货"
prop=
"isCargoControl"
>
...
...
@@ -58,11 +59,12 @@
<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=
"跟进客服"
>
<customer-selector
/>
<el-form-item
label=
"客户经理"
>
<!--
<customer-selector
/>
-->
// TODO
</el-form-item>
<el-form-item
label=
"订单状态"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.
PAY_
ORDER_STATUS"
v-model=
"queryParams.status"
<dict-selector
:type=
"DICT_TYPE.ORDER_STATUS"
v-model=
"queryParams.status"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"报关方式"
prop=
"customsType"
>
...
...
@@ -70,15 +72,16 @@
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"是否齐货"
>
<!--// 字段存疑-->
<dict-selector
v-model=
"queryParams.isCargoControl"
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter=
"bool"
/>
</el-form-item>
<el-form-item
label=
"重货比"
prop=
"weightRatio"
>
<
!--
<
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>
-->
<el-form-item
label=
"备案属性"
prop=
"productRecord"
>
<dict-selector
:type=
"DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
v-model=
"queryParams.productRecord"
clearable
@
keyup.enter.native=
"handleQuery"
/>
...
...
src/views/ecw/productPrice/edit.vue
View file @
ff6c4f83
...
...
@@ -55,20 +55,62 @@
<el-card
style=
"margin-bottom: 10px"
>
<div
slot=
"header"
style=
"font-size:20px;"
>
价格设置
<span>
<el-checkbox
label=
""
@
change=
"form.advanceStatus=$event ? 1 : 0"
>
预付
</el-checkbox>
<el-checkbox
label=
""
@
change=
"form.stepPrice=$event ? 1 : 0"
>
阶梯订单
</el-checkbox>
</span>
</div>
<el-form-item
label=
"单价模式"
prop=
"priceType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PRICE_TYPE"
v-model=
"form.priceType"
form-type=
"radio"
defaultable
/>
</el-form-item>
<!--阶梯订单-->
<
template
v-if=
"form.stepPrice==1"
>
<div
v-for=
"(item, index) in priceStepList"
:key=
"index"
>
<div
style=
"font-size:14px; margin:10px 0"
>
第
{{
index
+
1
}}
阶梯定价方案:
<template
v-if=
"index == priceStepList.length - 1"
>
<el-link
type=
"primary"
@
click.native=
"priceStepList.push(
{})">添加区间
</el-link>
<el-divider
direction=
"vertical"
></el-divider>
<el-link
type=
"danger"
@
click.native=
"priceStepList.splice(index, 1)"
>
删除
</el-link>
</
template
>
</div>
<el-form-item
:label=
"`第${index+1}阶梯`"
>
<el-input
v-model=
"item.startNum"
type=
"number"
placeholder=
""
class=
"w100"
></el-input>
-
<el-input
v-model=
"item.endNum"
type=
"number"
placeholder=
""
class=
"w100"
></el-input>
/
<selector
v-model=
"form.weightUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
</el-form-item>
<el-form-item
label=
"默认运费"
v-if=
"form.priceType != 1"
>
<inputor
default=
"0"
v-model.number=
"item.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
class=
"w100 mr10"
/>
<selector
v-model=
"item.transportPriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
/
<selector
v-model=
"item.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
</el-form-item>
<el-form-item
label=
"默认清关费"
v-if=
"form.priceType != 1"
>
<inputor
default=
"0"
v-model.number=
"item.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
class=
"w100 mr10"
/>
<selector
v-model=
"item.clearancePriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
/
<selector
v-model=
"item.clearanceVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
</el-form-item>
<el-form-item
label=
"默认全包价"
v-if=
"form.priceType == 1"
>
<inputor
default=
"0"
v-model.number=
"item.allPrice"
type=
"number"
placeholder=
"整数或者两位小数"
class=
"w100 mr10"
/>
<selector
v-model=
"item.allPriceUnit"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
/
<selector
v-model=
"item.allVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
class=
"w100"
/>
</el-form-item>
</div>
</template>
<
template
v-else
>
<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-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"
/>
/
<selector
v-model=
"form.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</el-col>
</el-row>
</el-form-item>
...
...
@@ -126,11 +168,11 @@
</el-row>
</el-form-item>
</
template
>
</template>
<el-form-item
label=
"是否预付"
prop=
"advanceStatus"
>
<!-- <el-form-item label="是否预付" prop="advanceStatus">
<dict-selector form-type="radio" :type="DICT_TYPE.ADVANCE_STATUS" v-model="form.advanceStatus" />
</el-form-item>
</el-form-item>
-->
</el-card>
...
...
@@ -181,8 +223,12 @@ export default {
return
{
checkList
:
[],
selectedRoutes
:
[],
// 勾选的路线渠道
form
:
{},
form
:
{
stepPrice
:
0
,
advanceStatus
:
0
},
specialProducts
:
[],
priceStepList
:
[{},{}],
// 阶梯价格
// specialList:[], // 特殊需求,默认四个
rules
:
{
/* typeId: [{ required: true, message: "产品类型不能为空", trigger: "blur" }],
...
...
@@ -321,6 +367,9 @@ export default {
specialList
:
this
.
specialProducts
,
isAllProduct
:
0
})
if
(
this
.
form
.
stepPrice
==
1
){
data
.
priceStepList
=
this
.
priceStepList
}
// 修改的提交
if
(
this
.
$route
.
query
.
ids
)
{
...
...
@@ -348,7 +397,7 @@ export default {
data
.
productIdList
=
[
this
.
form
.
productId
]
batchUpdateProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
this
.
$router
.
replace
(
'
/product/product-price
?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
()
)
})
return
;
...
...
@@ -358,10 +407,18 @@ export default {
data
.
lineChannelList
=
this
.
selectedRoutes
createProductPrice
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
$router
.
replace
(
'
/product/product-price
'
)
this
.
$router
.
replace
(
'
/product/product-price
?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
()
)
});
});
},
}
}
</
script
>
<
style
scoped
>
.w100
{
width
:
100px
;
}
.mr10
{
margin-right
:
10px
;
}
</
style
>
\ No newline at end of file
src/views/ecw/productPrice/index.vue
View file @
ff6c4f83
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-title"
>
{{
$route
.
query
.
product_id
?
productTitle
+
'
-
'
:
'
全部
'
}}
路线价格列表
</div>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"商品编码"
prop=
"productCode"
>
<el-form-item
label=
"商品编码"
prop=
"productCode"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入商品编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.customsCode"
placeholder=
"请输入海关编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
v-if=
"!$route.query.product_id"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入商品名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-form-item
label=
"商品类型"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择商品类型"
clearable
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品特性"
prop=
"attrId"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品特性"
clearable
>
<el-form-item
label=
"商品属性"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品属性"
clearable
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品特性"
prop=
"attrId"
v-if=
"!$route.query.product_id"
>
// TODO
</el-form-item>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
/>
</el-form-item>
<el-form-item
label=
"空运渠道"
prop=
"shippingChannelId"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startCityId"
>
<el-select
v-model=
"queryParams.startCityId"
clearable
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
...
...
@@ -38,19 +47,12 @@
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"空运渠道"
prop=
"shippingChannelId"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"blacklist"
v-if=
"false"
>
<el-checkbox
v-model=
"queryParams.blacklist"
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
<el-form-item
label=
"状态"
prop=
"destCityId"
v-if=
"!$route.query.product_id"
>
// TODO
</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>
...
...
@@ -59,11 +61,16 @@
<!-- 操作工具栏 -->
<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-col
:span=
"1.5"
v-if=
"$route.query.product_id"
>
<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=
"handleBatchEdit"
:disabled=
"multiple"
v-hasPermi=
"['ecw:product:attr']"
>
批量设置路线
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleBatchEdit"
:disabled=
"multiple"
>
设置已选路线价格
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleBatchEdit"
:disabled=
"multiple"
>
批量加入黑名单
</el-button>
<el-button
v-if=
"!$route.query.product_id"
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleBatchEdit"
:disabled=
"multiple"
>
批量下架
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-setting"
size=
"mini"
@
click=
"handleBatchEdit"
: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"
...
...
@@ -77,7 +84,7 @@
<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"
>
<el-table-column
label=
"商品编码"
align=
"center"
prop=
"productCode"
v-if=
"!$route.query.product_id"
>
<template
slot-scope=
"
{row}">
<div>
{{
row
.
productDO
?
row
.
productDO
.
productCode
:
'
无productDO字段
'
}}
...
...
@@ -85,7 +92,7 @@
</
template
>
</el-table-column>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
v-if=
"!$route.query.product_id"
>
<
template
slot-scope=
"{row}"
>
<div>
{{
row
.
productDO
?
row
.
productDO
.
customsCode
:
'
无productDO字段
'
}}
...
...
@@ -93,16 +100,16 @@
</
template
>
</el-table-column>
<el-table-column
label=
"商品类型"
align=
"center"
prop=
"typeId"
>
<el-table-column
label=
"商品类型"
align=
"center"
prop=
"typeId"
v-if=
"!$route.query.product_id"
>
<
template
slot-scope=
"{row}"
>
<span>
{{
row
.
productDO
?
getTypeName
(
row
.
productDO
.
typeId
)
:
'
无productDO字段
'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"productName"
>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"productName"
v-if=
"!$route.query.product_id"
>
<
template
slot-scope=
"{row}"
>
<div>
{{
row
.
productDO
?
row
.
productDO
.
titleZh
:
'
无productDO字段
'
}}
{{
row
.
productDO
?
row
.
productDO
.
titleZh
+
'
/
'
+
row
.
productDO
.
titleEn
:
'
无productDO字段
'
}}
</div>
</
template
>
</el-table-column>
...
...
@@ -154,7 +161,8 @@
<el-table-column
prop=
"advanceStatus"
label=
"预付"
align=
"center"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<div>
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
<!--
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
-->
<dict-tag
:type=
"DICT_TYPE.ADVANCE_STATUS"
:value=
"scope.row.advanceStatus"
></dict-tag>
</div>
</
template
>
</el-table-column>
...
...
@@ -162,14 +170,14 @@
<el-table-column
label=
"操作"
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)"
v-hasPermi=
"['ecw:product-price:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'blacklist')"
v-hasPermi=
"['ecw:product-price:update']"
>
{{
scope
.
row
.
blacklist
==
0
?
'
加入黑名单
'
:
'
移除黑名单
'
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'auditStatus')"
v-hasPermi=
"['ecw:product-price:update']"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
'
下架
'
:
'
上架
'
}}
</el-button>
<
!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:product-price:delete']"
>
删除
</el-button>
-->
v-hasPermi=
"['ecw:product-price:update']"
>
编辑
</el-button>
<el-button
v-if=
"!$route.query.product_id"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'blacklist')"
>
{{
scope
.
row
.
blacklist
==
0
?
'
加入黑名单
'
:
'
移除黑名单
'
}}
</el-button>
<el-button
v-if=
"!$route.query.product_id"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'auditStatus')"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
'
下架
'
:
'
上架
'
}}
</el-button>
<
el-button
v-if=
"!$route.query.product_id"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:product-price:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -193,6 +201,7 @@ import { AuditStatusEnum} from '@/utils/constants'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
DictTag
from
'
@/components/DictTag
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
{
getProduct
}
from
'
@/api/ecw/product
'
;
export
default
{
name
:
"
ProductPrice
"
,
components
:
{
...
...
@@ -273,7 +282,7 @@ export default {
lineList
:
[],
transportDatas
:
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
advanceStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
ADVANCE_STATUS
),
/* advanceStatusDictDatas: getDictDatas(DICT_TYPE.ADVANCE_STATUS), */
AuditStatusEnum
:
AuditStatusEnum
,
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
),
...
...
@@ -281,14 +290,24 @@ export default {
},
computed
:
{
// 商品名称
productTitle
(){
if
(
!
this
.
product
){
return
''
}
return
this
.
product
.
titleZh
},
// 渠道用id做键值
keyedChannel
(){
return
arrryToKeyedObjectBy
(
this
.
channelList
,
'
channelId
'
)
},
// 根据渠道id获取渠道名
channelName
(){
return
id
=>
{
return
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
}
},
// 根据类型获取类型名称
getTypeName
()
{
return
typeId
=>
{
for
(
let
index
in
this
.
typeList
)
{
...
...
@@ -299,7 +318,7 @@ export default {
}
}
},
// 根据状态获取状态名称 ,这个应该可以改成字典,目前接口缺少相关数据,待定
statusName
()
{
return
row
=>
{
if
(
row
.
blacklist
)
return
'
黑名单
'
;
...
...
@@ -308,18 +327,13 @@ export default {
}
},
// 根据运输方式获取名称
transportName
()
{
return
transportType
=>
{
return
this
.
getDictDataLabel
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
,
transportType
)
/* for(let index in this.transportDatas) {
let transportItem = this.transportDatas[index];
if(transportItem.value == transportType) {
return transportItem.label;
}
} */
}
},
// 显示币种符号
getCurrencySymbol
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currecyList
)
{
...
...
@@ -330,7 +344,7 @@ export default {
}
}
},
// 显示币种名称
getCurrencyTitle
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currecyList
)
{
...
...
@@ -353,7 +367,7 @@ export default {
}
},
getAdvanceStatuTitle
()
{
/*
getAdvanceStatuTitle() {
return value => {
for(let index in this.advanceStatusDictDatas) {
let dictItem = this.advanceStatusDictDatas[index];
...
...
@@ -362,7 +376,7 @@ export default {
}
}
}
}
}
*/
},
activated
()
{
...
...
@@ -391,13 +405,22 @@ export default {
if
(
this
.
$route
.
query
.
product_type
){
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
+
this
.
$route
.
query
.
product_type
);
}
// 指定产品获取产品信息
if
(
this
.
$route
.
query
.
product_id
){
getProduct
(
this
.
$route
.
query
.
product_id
).
then
(
res
=>
{
this
.
product
=
res
.
data
})
}
else
{
// 不指定产品获取类型等信息
this
.
getTypeList
();
this
.
getChannelList
()
this
.
getAttrList
();
//获取城市列表
this
.
getAllCityList
();
this
.
getAttrList
();
}
this
.
getChannelList
()
//获取货币列表
this
.
requestCurrencyList
();
//获取单位列表
...
...
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