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
77beeb39
Commit
77beeb39
authored
Jun 23, 2022
by
Marcus
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
26cd01d1
70af7de0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
287 additions
and
104 deletions
+287
-104
index.vue
src/components/CustomersSelector/index.vue
+1
-1
index.vue
src/components/Inputor/index.vue
+45
-0
index.vue
src/components/RoutersSelector/index.vue
+75
-33
edit.vue
src/views/ecw/channel/edit.vue
+3
-3
edit.vue
src/views/ecw/coupon/edit.vue
+127
-39
edit.vue
src/views/ecw/productPrice/edit.vue
+36
-28
No files found.
src/components/CustomersSelector/index.vue
View file @
77beeb39
...
...
@@ -5,7 +5,7 @@
<div
slot=
"header"
class=
"header"
>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱"
style=
"width:200px"
/>
<dict-selector
:type=
"DICT_TYPE.USER_TYPE"
v-model=
"queryParams.customerType"
style=
"width:100px"
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜
搜1
</el-button>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜
索
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
...
...
src/components/Inputor/index.vue
0 → 100644
View file @
77beeb39
<
template
>
<el-input
v-model=
"valueSync"
:type=
"type"
:clearable=
"clearable"
:placeholder=
"placeholder"
/>
</
template
>
<
script
>
export
default
{
data
(){
return
{
valueSync
:
null
}
},
props
:{
type
:
String
,
value
:
[
String
,
Number
],
clearable
:
Boolean
,
placeholder
:
String
,
default
:
String
,
// 默认值
},
computed
:{
},
watch
:{
valueSync
(
val
){
this
.
$emit
(
'
input
'
,
val
)
},
value
(
value
){
this
.
valueSync
=
value
this
.
setDefault
()
}
},
created
(){
this
.
valueSync
=
this
.
value
this
.
setDefault
()
},
methods
:{
setDefault
(){
if
(
!
this
.
default
){
return
false
}
if
(
this
.
valueSync
==
null
||
this
.
valueSync
==
''
){
this
.
valueSync
=
this
.
default
}
}
}
}
</
script
>
\ No newline at end of file
src/components/RoutersSelector/index.vue
View file @
77beeb39
...
...
@@ -2,7 +2,7 @@
<div>
<div
class=
"filters mb-10"
>
运输方式
<dict-selector
:type=
'DICT_TYPE.ECW_TRANSPORT_TYPE'
v-model=
"transportType"
placeholder=
"请选择运输方式"
/>
<dict-selector
:type=
'DICT_TYPE.ECW_TRANSPORT_TYPE'
v-model=
"transportType"
placeholder=
"请选择运输方式"
style=
"width:150px"
/>
始发地:
<el-select
placeholder=
"请选择始发地"
v-model=
"exportCity"
clearable
>
...
...
@@ -13,6 +13,17 @@
<el-select
placeholder=
"请选择目的地"
v-model=
"importCity"
clearable
>
<el-option
v-for=
"item in importCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
出货渠道:
<el-select
placeholder=
"请选择目渠道"
v-model=
"channelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.channelId"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</div>
<div
class=
"mb-10"
>
<el-radio-group
v-model=
"checkAll"
>
<el-radio
:label=
"true"
>
全选
</el-radio>
<el-radio
:label=
"false"
>
全不选
</el-radio>
</el-radio-group>
</div>
<el-row
class=
""
:gutter=
"10"
>
<template
v-for=
"item in filteredRouterList"
>
...
...
@@ -22,17 +33,18 @@
{{
item
.
label
}}
<el-link
type=
"primary"
@
click.native=
"toggleHide(item.value)"
style=
"float:right"
>
{{
item
.
_hide
?
'
展开
'
:
'
折叠
'
}}
</el-link>
</div>
<el-table
v-if=
"!hideMap[item.value]"
:data=
"item.routerList"
:span-method=
"SpanMethod"
border
>
<!--table需要给一个key,否则全选的时候不会自动更新渲染-->
<el-table
v-if=
"!hideMap[item.value]"
:data=
"item.routerList"
:span-method=
"SpanMethod"
border
:key=
"selectedRoutes.length + item.value"
>
<el-table-column
label=
"始发地"
prop=
"startTitleZh"
/>
<el-table-column
label=
"目的地"
prop=
"destTitleZh"
/>
<el-table-column
label=
"渠道"
prop=
"startTitleZh"
>
<template
slot-scope=
"
{row}">
{{
row
.
channel
.
nameZh
}}
11
{{
row
.
channel
.
nameZh
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
prop=
""
>
<
template
slot-scope=
"{row}"
>
<el-checkbox
:checked=
"getSelectedIndex(row)
!== null
"
@
change=
"toggleChecker(row, $event)"
></el-checkbox>
<el-checkbox
:checked=
"getSelectedIndex(row)
> -1
"
@
change=
"toggleChecker(row, $event)"
></el-checkbox>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -56,47 +68,55 @@ export default {
transportType
:
null
,
// 运输方式
importCity
:
null
,
// 目的地(进口城市)
exportCity
:
null
,
// 始发地(出口城市)
channelId
:
null
,
selectedRoutes
:
[],
// 勾选的路线渠道
hideMap
:
{},
// 折叠状态
checkAll
:
null
,
}
},
computed
:{
importCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
},
exportCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
},
availChannelList
(){
return
this
.
channelList
.
filter
(
item
=>
!
this
.
channelId
||
this
.
channelId
==
item
.
channelId
)
},
filteredRouterList
(){
let
transportTypeList
=
[]
this
.
transportTypeDicts
.
forEach
(
item
=>
{
if
(
this
.
transportType
===
null
||
this
.
transportType
==
''
||
this
.
transportType
==
item
.
value
){
let
routerList
=
[]
this
.
openedRouterList
.
forEach
(
router
=>
{
if
(
router
.
transportType
==
item
.
value
){
routerList
.
push
(
Object
.
assign
({
_merge
:
item
.
cssClass
==
'
channel
'
?
this
.
channelList
.
length
||
1
:
1
,
channel
:
item
.
cssClass
==
'
channel
'
?
this
.
channelList
[
0
]
||
{}
:
{},
},
router
))
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
if
(
item
.
cssClass
==
'
channel
'
){
this
.
channelList
.
slice
(
1
).
forEach
(
channel
=>
{
routerList
.
push
(
Object
.
assign
({
channel
,
_merge
:
0
},
router
))
})
this
.
transportTypeDicts
.
filter
(
transport
=>
!
this
.
channelId
||
transport
.
cssClass
==
'
channel
'
)
.
forEach
(
item
=>
{
if
(
this
.
transportType
===
null
||
this
.
transportType
==
''
||
this
.
transportType
==
item
.
value
){
let
routerList
=
[]
this
.
openedRouterList
.
forEach
(
router
=>
{
if
(
router
.
transportType
==
item
.
value
){
routerList
.
push
(
Object
.
assign
({
_merge
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
.
length
||
1
:
1
,
channel
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
[
0
]
||
{}
:
{},
},
router
)
)
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
if
(
item
.
cssClass
==
'
channel
'
){
this
.
availChannelList
.
slice
(
1
).
forEach
(
channel
=>
{
routerList
.
push
(
Object
.
assign
({
channel
,
_merge
:
0
},
router
))
})
}
}
}
})
})
let
child
=
{
label
:
item
.
label
,
value
:
item
.
value
,
_hide
:
false
,
// 是否折叠
routerList
:
routerList
let
child
=
{
label
:
item
.
label
,
value
:
item
.
value
,
_hide
:
false
,
// 是否折叠
routerList
:
routerList
}
transportTypeList
.
push
(
child
)
}
transportTypeList
.
push
(
child
)
}
})
})
return
transportTypeList
}
},
...
...
@@ -109,9 +129,27 @@ export default {
},
selectedRoutes
(
val
){
this
.
$emit
(
'
input
'
,
val
)
// 如果选择发生变化
let
total
=
0
this
.
filteredRouterList
.
forEach
(
item
=>
{
total
+=
item
.
routerList
.
length
})
if
(
total
!=
val
.
length
&&
val
.
length
){
this
.
checkAll
=
null
}
},
value
(
val
){
this
.
selectedRoutes
=
val
||
[]
},
checkAll
(
val
){
if
(
val
===
true
||
val
===
false
){
console
.
log
(
'
选中全部
'
)
this
.
filteredRouterList
.
forEach
(
item
=>
{
item
.
routerList
.
forEach
(
router
=>
{
if
(
this
.
getSelectedIndex
(
router
)
>
-
1
!=
val
)
this
.
toggleChecker
(
router
,
val
)
})
})
}
}
},
created
(){
...
...
@@ -139,7 +177,7 @@ export default {
},
// 切换路线选择
toggleChecker
(
router
,
selected
){
this
.
getSelectedIndex
(
router
)
//
this.getSelectedIndex(router)
/* this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == item.channel.id){
index = i
...
...
@@ -153,21 +191,25 @@ export default {
})
}
else
{
let
index
=
this
.
getSelectedIndex
(
router
)
if
(
index
!==
null
){
if
(
index
>
-
1
){
this
.
selectedRoutes
.
splice
(
index
,
1
)
}
}
},
getSelectedIndex
(
router
){
let
index
=
null
return
this
.
selectedRoutes
.
findIndex
(
item
=>
{
return
item
.
lineId
==
router
.
id
&&
item
.
shippingChannelId
==
router
.
channel
.
channelId
})
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
// break
}
})
return
index
return index
*/
},
SpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
if
(
columnIndex
<
2
)
{
...
...
src/views/ecw/channel/edit.vue
View file @
77beeb39
...
...
@@ -138,7 +138,7 @@ import {
exportChannelExcel
,
}
from
"
@/api/ecw/channel
"
;
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
{
getExpress
List
}
from
'
@/api/ecw/express
'
import
{
getExpress
Page
}
from
'
@/api/ecw/express
'
export
default
{
data
()
{
return
{
...
...
@@ -166,8 +166,8 @@ export default {
await
getWarehouseList
().
then
(
res
=>
{
this
.
warehouseList
=
res
.
data
})
await
getExpress
List
(
).
then
(
res
=>
{
this
.
expressList
=
res
.
data
await
getExpress
Page
({
pageSize
:
1000
}
).
then
(
res
=>
{
this
.
expressList
=
res
.
data
.
list
})
if
(
this
.
$route
.
query
.
id
)
{
...
...
src/views/ecw/coupon/edit.vue
View file @
77beeb39
...
...
@@ -39,37 +39,99 @@
/>
注意:留空则表示永久有效
</el-form-item>
<el-form-item
label=
"*运费"
>
<!--1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价-->
<el-form-item
label=
"优惠券金额"
v-if=
"form.type == 1"
>
<div
class=
"fee-item"
>
<el-input
v-model=
"form.reduceAmount"
style=
"width:100px"
/>
<Selector
v-model=
"form.reduceCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span>
满
</span>
<el-input
type=
"number"
v-model=
"form.cashCondition"
style=
"width:100px"
/>
<span>
使用
</span>
<span
style=
"color:red"
>
注意:留空则表示不受满金额限制
</span>
</div>
</el-form-item>
<el-form-item
label=
"*运费"
v-if=
"[2,3,4,5,6,7].indexOf(form.type) > -1"
>
<div
class=
"fee-item"
v-for=
"(item, index) in freightFeeList"
:key=
"index"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<!--
<el-select
v-model=
"item.fullCurrencyId"
style=
"width:100px"
>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
减
<el-input
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<!--
<el-select
v-model=
"item.reduceCurrencyId"
style=
"width:100px"
>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<!--
<el-select
v-model=
"item.fullCurrencyId"
style=
"width:100px"
>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
<Selector
v-if=
"[2,4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<Selector
v-if=
"form.type == 3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
<span
v-if=
"[5].indexOf(form.type) > -1"
>
收
</span>
<el-input
v-if=
"[2,3,4].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<Selector
v-if=
"[2,3].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
%
</span>
</
template
>
<
template
v-if=
"form.type==7"
>
>
<el-input
v-model=
"item.startAmount"
style=
"width:100px"
/>
≤
<el-input
v-model=
"item.endAmount"
style=
"width:100px"
/>
<Selector
v-model=
"item.startAndEndCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
价格
</
template
>
<el-input
v-if=
"[5,6,7].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.netReceiptsAmount"
style=
"width:100px"
/>
<Selector
v-if=
"[5,6,7].indexOf(form.type) > -1"
v-model=
"item.netReceiptsCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
template
v-if=
"form.type == 6"
>
/
<Selector
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</
template
>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"freightFeeList.push({})"
/>
<el-button
v-if=
"freightFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"freightFeeList.splice(index,1)"
/>
</div>
</el-form-item>
<el-form-item
label=
"清关费"
>
<div
class=
"fee-item"
v-for=
"(item, index) in clearanceFeeList"
:key=
"index"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
减
<el-input
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"clearanceFeeList.push(
{})" />
<el-button
v-if=
"clearanceFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"clearanceFeeList.splice(index,1)"
/>
<el-form-item
label=
"清关费"
v-if=
"[2,3,4,5,6,7].indexOf(form.type) > -1"
>
<div
class=
"fee-item"
v-for=
"(item, index) in clearanceFeeList"
:key=
"index"
>
<
template
v-if=
"[1,2,3,4,5].indexOf(form.type) > -1"
>
满
<el-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<Selector
v-if=
"[2,4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<Selector
v-if=
"form.type == 3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
<span
v-if=
"[5].indexOf(form.type) > -1"
>
收
</span>
<el-input
v-if=
"[2,3,4].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.reduceAmount"
style=
"width:100px"
/>
<Selector
v-if=
"[2,3].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
%
</span>
</
template
>
<
template
v-if=
"form.type==7"
>
>
<el-input
v-model=
"item.startAmount"
style=
"width:100px"
/>
≤
<el-input
v-model=
"item.endAmount"
style=
"width:100px"
/>
<Selector
v-model=
"item.startAndEndCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
价格
</
template
>
<el-input
v-if=
"[5,6,7].indexOf(form.type) > -1"
type=
"number"
v-model=
"item.netReceiptsAmount"
style=
"width:100px"
/>
<Selector
v-if=
"[5,6,7].indexOf(form.type) > -1"
v-model=
"item.netReceiptsCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<
template
v-if=
"form.type == 6"
>
/
<Selector
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</
template
>
<el-button
class=
"el-icon-plus"
size=
"mini"
type=
"primary"
@
click=
"freightFeeList.push({})"
/>
<el-button
v-if=
"freightFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"freightFeeList.splice(index,1)"
/>
</div>
</el-form-item>
...
...
@@ -139,15 +201,17 @@
<el-form-item
label=
"同类叠加"
prop=
"isSimilarSuperposition"
v-if=
"form.type != 1"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSimilarSuperposition"
placeholder=
"请选择类型"
/>
</el-form-item>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
v-if=
"form.type != 1"
>
<el-input
v-model=
"form.couponIds"
placeholder=
"请输入可叠加优惠劵列表"
...
...
@@ -164,6 +228,7 @@
<el-form-item
label=
"适用线路类型"
prop=
"suitableLineType"
v-if=
"form.type != 1"
>
<dict-selector
:type=
"DICT_TYPE.ECW_SUITABLE_LINE_TYPE"
v-model=
"form.suitableLineType"
/>
<routers-selector
v-if=
"showRouterSelector"
v-model=
"form.lineIds"
style=
"margin-top:5px"
/>
...
...
@@ -171,6 +236,7 @@
<el-form-item
label=
"适用商品"
prop=
"prodIds"
v-if=
"form.type != 1"
>
<!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> -->
<products-selector
v-model=
"form.prodIds"
/>
...
...
@@ -178,33 +244,37 @@
<el-form-item
label=
"订单属性"
prop=
"orderAttr"
v-if=
"form.type != 1"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_ORDER_ATTR"
v-model=
"form.orderAttr"
multiple
/>
</el-form-item>
<el-form-item
label=
"是否发送站内信"
prop=
"isSiteContent"
>
<dict-selector
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSiteContent"
/>
</el-form-item>
<el-form-item
label=
"
*
中文内容"
prop=
"contentZh"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-form-item
label=
"中文内容"
prop=
"contentZh"
:rules=
'[{required: true, message: "不能为空"}]'
>
<editor
v-model=
"form.contentZh"
:min-height=
"192"
/>
</el-form-item>
<el-form-item
label=
"
*
英文内容"
prop=
"contentEn"
:rules=
'[
{required: true, message: "不能为空"}]'>
<el-form-item
label=
"英文内容"
prop=
"contentEn"
:rules=
'[{required: true, message: "不能为空"}]'
>
<editor
v-model=
"form.contentEn"
:min-height=
"192"
/>
</el-form-item>
<el-form-item
label=
"品牌"
prop=
"brand"
v-if=
"form.type != 1"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.BRAND_REG_TYPE"
v-model=
"form.brand"
multiple
/>
</el-form-item>
<el-form-item
label=
"是否控货"
prop=
"isCargoControl"
v-if=
"form.type != 1"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isCargoControl"
multiple
/>
</el-form-item>
<el-form-item
label=
"单证报关"
prop=
"documentDeclaration"
v-if=
"form.type != 1"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.documentDeclaration"
multiple
/>
</el-form-item>
...
...
@@ -274,6 +344,7 @@
</template>
<
script
>
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
{
createCoupon
,
updateCoupon
,
...
...
@@ -288,6 +359,7 @@ import RoutersSelector from '@/components/RoutersSelector'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
Editor
from
'
@/components/Editor
'
import
Selector
from
'
@/components/Selector
'
export
default
{
name
:
"
CouponEdit
"
,
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
...
...
@@ -303,7 +375,9 @@ export default {
rules
:
{},
currencyList
:[],
clearanceFeeList
:[{},{}],
freightFeeList
:[{},{}]
freightFeeList
:[{},{}],
discountList
:[{}],
// 优惠券固定一条
unitList
:[]
};
},
computed
:{
...
...
@@ -334,21 +408,31 @@ export default {
})
let
discountedList
=
activeField
?
this
[
activeField
]
:
[]
discountedList
.
forEach
(
item
=>
{
[
'
endAmount
'
,
'
fullAmount
'
,
'
fullCurrencyId
'
,
'
netReceiptsAmount
'
,
'
netReceiptsCurrencyId
'
,
'
prodUnit
'
,
'
reduceAmount
'
,
'
reduceCurrencyId
'
,
'
startAmount
'
,
'
startAndEndCurrencyId
'
].
forEach
(
field
=>
{
[
'
endAmount
'
,
'
fullAmount
'
,
'
fullCurrencyId
'
,
'
netReceiptsAmount
'
,
'
netReceiptsCurrencyId
'
,
'
prodUnit
'
,
'
reduceAmount
'
,
'
reduceCurrencyId
'
,
'
startAmount
'
,
'
startAndEndCurrencyId
'
].
forEach
(
field
=>
{
if
(
item
[
field
])
item
[
field
]
=
parseFloat
(
item
[
field
])
})
})
return
discountedList
}
},
watch
:{
'
form.type
'
(
val
){
// 方数满减3和特价6需要单位
if
((
val
==
3
||
val
==
6
)
&&
!
this
.
unitList
.
length
){
this
.
getUnitList
()
}
}
},
created
()
{
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
...
...
@@ -360,6 +444,10 @@ export default {
this
.
reset
()
},
methods
:
{
getUnitList
(){
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
...
...
src/views/ecw/productPrice/edit.vue
View file @
77beeb39
...
...
@@ -28,38 +28,42 @@
<el-form-item
label=
"默认运费"
prop=
"transportPrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.transportPriceUnit"
>
<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-select>
-->
</el-col>
<el-col
:span=
"6"
>
<
el-input
v-model.number=
"form.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
<
inputor
default=
"0"
v-model.number=
"form.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.transportVolumeUnit"
>
/
<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-select>
-->
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"默认清关费"
prop=
"clearancePrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.clearancePriceUnit"
>
<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-select>
-->
</el-col>
<el-col
:span=
"6"
>
<
el-input
v-model.number=
"form.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
<
inputor
default=
"0"
v-model.number=
"form.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.clearanceVolumeUnit"
>
/
<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-select>
-->
</el-col>
</el-row>
</el-form-item>
...
...
@@ -68,38 +72,43 @@
<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"
>
<el-select
v-model=
"special.transportPriceUnit"
>
<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-select>
-->
</el-col>
<el-col
:span=
"6"
>
<
el-input
v-model.number=
"special.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
<
inputor
default=
"0"
v-model.number=
"special.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"special.transportVolumeUnit"
>
/
<selector
v-model=
"special.transportVolumeUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<!--
<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-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"
>
<el-select
v-model=
"special.clearancePriceUnit"
>
<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-select>
-->
</el-col>
<el-col
:span=
"6"
>
<
el-input
v-model.number=
"special.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
<
inputor
default=
"0"
v-model.number=
"special.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"special.clearanceVolumeUnit"
>
/
<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-select>
-->
</el-col>
</el-row>
</el-form-item>
...
...
@@ -107,7 +116,7 @@
<el-form-item
label=
"是否预付"
prop=
"advanceStatus"
>
<dict-selector
:type=
"DICT_TYPE.ADVANCE_STATUS"
v-model=
"form.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> -->
...
...
@@ -126,9 +135,7 @@
</el-form-item>
<el-form-item
label=
"每日入仓上限"
prop=
"dayLimit"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
>
<
template
slot=
"append"
>
立方米
</
template
>
</el-input>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
style=
"width:100px"
/>
立方米
</el-form-item>
<el-form-item
label=
"货柜位置"
prop=
"containerLocation"
>
...
...
@@ -139,9 +146,7 @@
</el-form-item>
<el-form-item
label=
"方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
>
<!-- <template slot="append">立方米</template> -->
</el-input>
<el-input
v-model.number=
"form.square"
type=
"number"
style=
"width:200px"
/>
</el-form-item>
</el-card>
...
...
@@ -163,8 +168,11 @@ import { getCurrencyList } from '@/api/ecw/currency';
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
ProductSelector
from
'
@/components/ProductSelector
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
import
Selector
from
'
@/components/Selector
'
import
Inputor
from
'
@/components/Inputor
'
export
default
{
components
:
{
RoutersSelector
,
ProductSelector
},
components
:
{
RoutersSelector
,
ProductSelector
,
Selector
,
Inputor
},
data
(){
return
{
selectedRoutes
:
[],
// 勾选的路线渠道
...
...
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