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
122eb611
Commit
122eb611
authored
Jun 23, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善优惠券
parent
1c95a56a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
204 additions
and
74 deletions
+204
-74
index.vue
src/components/CustomersSelector/index.vue
+1
-1
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
+125
-37
No files found.
src/components/CustomersSelector/index.vue
View file @
122eb611
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
slot=
"header"
class=
"header"
>
<div
slot=
"header"
class=
"header"
>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱"
style=
"width:200px"
/>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱"
style=
"width:200px"
/>
<dict-selector
:type=
"DICT_TYPE.USER_TYPE"
v-model=
"queryParams.customerType"
style=
"width:100px"
/>
<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>
<div
class=
"list"
>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
...
...
src/components/RoutersSelector/index.vue
View file @
122eb611
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<div
class=
"filters mb-10"
>
<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
>
<el-select
placeholder=
"请选择始发地"
v-model=
"exportCity"
clearable
>
...
@@ -13,6 +13,17 @@
...
@@ -13,6 +13,17 @@
<el-select
placeholder=
"请选择目的地"
v-model=
"importCity"
clearable
>
<el-select
placeholder=
"请选择目的地"
v-model=
"importCity"
clearable
>
<el-option
v-for=
"item in importCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
<el-option
v-for=
"item in importCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
</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>
</div>
<el-row
class=
""
:gutter=
"10"
>
<el-row
class=
""
:gutter=
"10"
>
<template
v-for=
"item in filteredRouterList"
>
<template
v-for=
"item in filteredRouterList"
>
...
@@ -22,17 +33,18 @@
...
@@ -22,17 +33,18 @@
{{
item
.
label
}}
{{
item
.
label
}}
<el-link
type=
"primary"
@
click.native=
"toggleHide(item.value)"
style=
"float:right"
>
{{
item
.
_hide
?
'
展开
'
:
'
折叠
'
}}
</el-link>
<el-link
type=
"primary"
@
click.native=
"toggleHide(item.value)"
style=
"float:right"
>
{{
item
.
_hide
?
'
展开
'
:
'
折叠
'
}}
</el-link>
</div>
</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=
"startTitleZh"
/>
<el-table-column
label=
"目的地"
prop=
"destTitleZh"
/>
<el-table-column
label=
"目的地"
prop=
"destTitleZh"
/>
<el-table-column
label=
"渠道"
prop=
"startTitleZh"
>
<el-table-column
label=
"渠道"
prop=
"startTitleZh"
>
<template
slot-scope=
"
{row}">
<template
slot-scope=
"
{row}">
{{
row
.
channel
.
nameZh
}}
11
{{
row
.
channel
.
nameZh
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
prop=
""
>
<el-table-column
label=
"操作"
prop=
""
>
<
template
slot-scope=
"{row}"
>
<
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
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -56,47 +68,55 @@ export default {
...
@@ -56,47 +68,55 @@ export default {
transportType
:
null
,
// 运输方式
transportType
:
null
,
// 运输方式
importCity
:
null
,
// 目的地(进口城市)
importCity
:
null
,
// 目的地(进口城市)
exportCity
:
null
,
// 始发地(出口城市)
exportCity
:
null
,
// 始发地(出口城市)
channelId
:
null
,
selectedRoutes
:
[],
// 勾选的路线渠道
selectedRoutes
:
[],
// 勾选的路线渠道
hideMap
:
{},
// 折叠状态
hideMap
:
{},
// 折叠状态
checkAll
:
null
,
}
}
},
},
computed
:{
computed
:{
importCityList
(){
importCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
},
},
exportCityList
(){
exportCityList
(){
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
},
},
availChannelList
(){
return
this
.
channelList
.
filter
(
item
=>
!
this
.
channelId
||
this
.
channelId
==
item
.
channelId
)
},
filteredRouterList
(){
filteredRouterList
(){
let
transportTypeList
=
[]
let
transportTypeList
=
[]
this
.
transportTypeDicts
.
forEach
(
item
=>
{
this
.
transportTypeDicts
if
(
this
.
transportType
===
null
||
this
.
transportType
==
''
||
this
.
transportType
==
item
.
value
){
.
filter
(
transport
=>
!
this
.
channelId
||
transport
.
cssClass
==
'
channel
'
)
let
routerList
=
[]
.
forEach
(
item
=>
{
this
.
openedRouterList
.
forEach
(
router
=>
{
if
(
this
.
transportType
===
null
||
this
.
transportType
==
''
||
this
.
transportType
==
item
.
value
){
if
(
router
.
transportType
==
item
.
value
){
let
routerList
=
[]
routerList
.
push
(
Object
.
assign
({
this
.
openedRouterList
.
forEach
(
router
=>
{
_merge
:
item
.
cssClass
==
'
channel
'
?
this
.
channelList
.
length
||
1
:
1
,
if
(
router
.
transportType
==
item
.
value
){
channel
:
item
.
cssClass
==
'
channel
'
?
this
.
channelList
[
0
]
||
{}
:
{},
routerList
.
push
(
Object
.
assign
({
},
router
))
_merge
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
.
length
||
1
:
1
,
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
channel
:
item
.
cssClass
==
'
channel
'
?
this
.
availChannelList
[
0
]
||
{}
:
{},
if
(
item
.
cssClass
==
'
channel
'
){
},
router
)
this
.
channelList
.
slice
(
1
).
forEach
(
channel
=>
{
)
routerList
.
push
(
Object
.
assign
({
channel
,
_merge
:
0
},
router
))
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
})
if
(
item
.
cssClass
==
'
channel
'
){
this
.
availChannelList
.
slice
(
1
).
forEach
(
channel
=>
{
routerList
.
push
(
Object
.
assign
({
channel
,
_merge
:
0
},
router
))
})
}
}
}
}
})
})
let
child
=
{
let
child
=
{
label
:
item
.
label
,
label
:
item
.
label
,
value
:
item
.
value
,
value
:
item
.
value
,
_hide
:
false
,
// 是否折叠
_hide
:
false
,
// 是否折叠
routerList
:
routerList
routerList
:
routerList
}
transportTypeList
.
push
(
child
)
}
}
transportTypeList
.
push
(
child
)
})
}
})
return
transportTypeList
return
transportTypeList
}
}
},
},
...
@@ -109,9 +129,27 @@ export default {
...
@@ -109,9 +129,27 @@ export default {
},
},
selectedRoutes
(
val
){
selectedRoutes
(
val
){
this
.
$emit
(
'
input
'
,
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
){
value
(
val
){
this
.
selectedRoutes
=
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
(){
created
(){
...
@@ -139,7 +177,7 @@ export default {
...
@@ -139,7 +177,7 @@ export default {
},
},
// 切换路线选择
// 切换路线选择
toggleChecker
(
router
,
selected
){
toggleChecker
(
router
,
selected
){
this
.
getSelectedIndex
(
router
)
//
this.getSelectedIndex(router)
/* this.selectedRoutes.forEach((item, i)=>{
/* this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == item.channel.id){
if(item.lineId == router.id && item.shippingChannelId == item.channel.id){
index = i
index = i
...
@@ -153,21 +191,25 @@ export default {
...
@@ -153,21 +191,25 @@ export default {
})
})
}
else
{
}
else
{
let
index
=
this
.
getSelectedIndex
(
router
)
let
index
=
this
.
getSelectedIndex
(
router
)
if
(
index
!==
null
){
if
(
index
>
-
1
){
this
.
selectedRoutes
.
splice
(
index
,
1
)
this
.
selectedRoutes
.
splice
(
index
,
1
)
}
}
}
}
},
},
getSelectedIndex
(
router
){
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)=>{
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
index = i
// break
// break
}
}
})
})
return
index
return index
*/
},
},
SpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
SpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
}){
if
(
columnIndex
<
2
)
{
if
(
columnIndex
<
2
)
{
...
...
src/views/ecw/channel/edit.vue
View file @
122eb611
...
@@ -138,7 +138,7 @@ import {
...
@@ -138,7 +138,7 @@ import {
exportChannelExcel
,
exportChannelExcel
,
}
from
"
@/api/ecw/channel
"
;
}
from
"
@/api/ecw/channel
"
;
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
{
getWarehouseList
}
from
'
@/api/ecw/warehouse
'
import
{
getExpress
List
}
from
'
@/api/ecw/express
'
import
{
getExpress
Page
}
from
'
@/api/ecw/express
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -166,8 +166,8 @@ export default {
...
@@ -166,8 +166,8 @@ export default {
await
getWarehouseList
().
then
(
res
=>
{
await
getWarehouseList
().
then
(
res
=>
{
this
.
warehouseList
=
res
.
data
this
.
warehouseList
=
res
.
data
})
})
await
getExpress
List
(
).
then
(
res
=>
{
await
getExpress
Page
({
pageSize
:
1000
}
).
then
(
res
=>
{
this
.
expressList
=
res
.
data
this
.
expressList
=
res
.
data
.
list
})
})
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
...
...
src/views/ecw/coupon/edit.vue
View file @
122eb611
...
@@ -39,37 +39,99 @@
...
@@ -39,37 +39,99 @@
/>
/>
注意:留空则表示永久有效
注意:留空则表示永久有效
</el-form-item>
</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"
>
<div
class=
"fee-item"
v-for=
"(item, index) in freightFeeList"
:key=
"index"
>
满
<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-input
v-model=
"item.fullAmount"
style=
"width:100px"
/>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
<!--
<el-select
v-model=
"item.fullCurrencyId"
style=
"width:100px"
>
</el-select>
-->
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
</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"
/>
<el-input
type=
"number"
v-model=
"item.reduceAmount"
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"
/>
<!--
<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"
/>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
</el-select>
-->
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
<Selector
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<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
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)"
/>
<el-button
v-if=
"freightFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"freightFeeList.splice(index,1)"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"清关费"
>
<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"
>
<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-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<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"
/>
<el-input
v-model=
"item.reduceAmount"
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"
/>
<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(
{})" />
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<el-button
v-if=
"clearanceFeeList.length > 1"
class=
"el-icon-minus"
size=
"mini"
type=
"danger"
@
click=
"clearanceFeeList.splice(index,1)"
/>
<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>
</div>
</el-form-item>
</el-form-item>
...
@@ -139,15 +201,17 @@
...
@@ -139,15 +201,17 @@
<el-form-item
<el-form-item
label=
"同类叠加"
label=
"同类叠加"
prop=
"isSimilarSuperposition"
prop=
"isSimilarSuperposition"
v-if=
"form.type != 1"
>
>
<dict-selector
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isSimilarSuperposition"
v-model=
"form.isSimilarSuperposition"
placeholder=
"请选择类型"
placeholder=
"请选择类型"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
>
<el-form-item
label=
"可叠加优惠劵列表"
prop=
"couponIds"
v-if=
"form.type != 1"
>
<el-input
<el-input
v-model=
"form.couponIds"
v-model=
"form.couponIds"
placeholder=
"请输入可叠加优惠劵列表"
placeholder=
"请输入可叠加优惠劵列表"
...
@@ -164,6 +228,7 @@
...
@@ -164,6 +228,7 @@
<el-form-item
<el-form-item
label=
"适用线路类型"
label=
"适用线路类型"
prop=
"suitableLineType"
prop=
"suitableLineType"
v-if=
"form.type != 1"
>
>
<dict-selector
:type=
"DICT_TYPE.ECW_SUITABLE_LINE_TYPE"
v-model=
"form.suitableLineType"
/>
<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"
/>
<routers-selector
v-if=
"showRouterSelector"
v-model=
"form.lineIds"
style=
"margin-top:5px"
/>
...
@@ -171,6 +236,7 @@
...
@@ -171,6 +236,7 @@
<el-form-item
<el-form-item
label=
"适用商品"
label=
"适用商品"
prop=
"prodIds"
prop=
"prodIds"
v-if=
"form.type != 1"
>
>
<!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> -->
<!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> -->
<products-selector
v-model=
"form.prodIds"
/>
<products-selector
v-model=
"form.prodIds"
/>
...
@@ -178,6 +244,7 @@
...
@@ -178,6 +244,7 @@
<el-form-item
<el-form-item
label=
"订单属性"
label=
"订单属性"
prop=
"orderAttr"
prop=
"orderAttr"
v-if=
"form.type != 1"
>
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_ORDER_ATTR"
v-model=
"form.orderAttr"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_ORDER_ATTR"
v-model=
"form.orderAttr"
multiple
/>
</el-form-item>
</el-form-item>
...
@@ -193,18 +260,21 @@
...
@@ -193,18 +260,21 @@
<el-form-item
<el-form-item
label=
"品牌"
label=
"品牌"
prop=
"brand"
prop=
"brand"
v-if=
"form.type != 1"
>
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.BRAND_REG_TYPE"
v-model=
"form.brand"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.BRAND_REG_TYPE"
v-model=
"form.brand"
multiple
/>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"是否控货"
label=
"是否控货"
prop=
"isCargoControl"
prop=
"isCargoControl"
v-if=
"form.type != 1"
>
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isCargoControl"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.isCargoControl"
multiple
/>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"单证报关"
label=
"单证报关"
prop=
"documentDeclaration"
prop=
"documentDeclaration"
v-if=
"form.type != 1"
>
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.documentDeclaration"
multiple
/>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"form.documentDeclaration"
multiple
/>
</el-form-item>
</el-form-item>
...
@@ -274,6 +344,7 @@
...
@@ -274,6 +344,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
{
import
{
createCoupon
,
createCoupon
,
updateCoupon
,
updateCoupon
,
...
@@ -288,6 +359,7 @@ import RoutersSelector from '@/components/RoutersSelector'
...
@@ -288,6 +359,7 @@ import RoutersSelector from '@/components/RoutersSelector'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
ProductsSelector
from
'
@/components/ProductsSelector
'
import
Editor
from
'
@/components/Editor
'
import
Editor
from
'
@/components/Editor
'
import
Selector
from
'
@/components/Selector
'
import
Selector
from
'
@/components/Selector
'
export
default
{
export
default
{
name
:
"
CouponEdit
"
,
name
:
"
CouponEdit
"
,
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
components
:
{
CustomersSelector
,
RoutersSelector
,
ProductsSelector
,
Editor
,
Selector
},
...
@@ -303,7 +375,9 @@ export default {
...
@@ -303,7 +375,9 @@ export default {
rules
:
{},
rules
:
{},
currencyList
:[],
currencyList
:[],
clearanceFeeList
:[{},{}],
clearanceFeeList
:[{},{}],
freightFeeList
:[{},{}]
freightFeeList
:[{},{}],
discountList
:[{}],
// 优惠券固定一条
unitList
:[]
};
};
},
},
computed
:{
computed
:{
...
@@ -334,21 +408,31 @@ export default {
...
@@ -334,21 +408,31 @@ export default {
})
})
let
discountedList
=
activeField
?
this
[
activeField
]
:
[]
let
discountedList
=
activeField
?
this
[
activeField
]
:
[]
discountedList
.
forEach
(
item
=>
{
discountedList
.
forEach
(
item
=>
{
[
'
endAmount
'
,
[
'
fullAmount
'
,
'
endAmount
'
,
'
fullCurrencyId
'
,
'
fullAmount
'
,
'
netReceiptsAmount
'
,
'
fullCurrencyId
'
,
'
netReceiptsCurrencyId
'
,
'
netReceiptsAmount
'
,
'
prodUnit
'
,
'
netReceiptsCurrencyId
'
,
'
reduceAmount
'
,
'
prodUnit
'
,
'
reduceCurrencyId
'
,
'
reduceAmount
'
,
'
startAmount
'
,
'
reduceCurrencyId
'
,
'
startAndEndCurrencyId
'
].
forEach
(
field
=>
{
'
startAmount
'
,
'
startAndEndCurrencyId
'
].
forEach
(
field
=>
{
if
(
item
[
field
])
item
[
field
]
=
parseFloat
(
item
[
field
])
if
(
item
[
field
])
item
[
field
]
=
parseFloat
(
item
[
field
])
})
})
})
})
return
discountedList
return
discountedList
}
}
},
watch
:{
'
form.type
'
(
val
){
// 方数满减3和特价6需要单位
if
((
val
==
3
||
val
==
6
)
&&
!
this
.
unitList
.
length
){
this
.
getUnitList
()
}
}
},
},
created
()
{
created
()
{
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
...
@@ -360,6 +444,10 @@ export default {
...
@@ -360,6 +444,10 @@ export default {
this
.
reset
()
this
.
reset
()
},
},
methods
:
{
methods
:
{
getUnitList
(){
getUnitList
().
then
(
res
=>
this
.
unitList
=
res
.
data
)
},
/** 表单重置 */
/** 表单重置 */
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
...
...
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