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
7bb311f1
Commit
7bb311f1
authored
Sep 25, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复优惠路线回显异常
parent
1fa8a603
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
37 deletions
+33
-37
index.vue
src/components/RoutersSelector/index.vue
+19
-23
edit.vue
src/views/ecw/coupon/edit.vue
+14
-14
No files found.
src/components/RoutersSelector/index.vue
View file @
7bb311f1
...
...
@@ -91,6 +91,7 @@ export default {
hideMap
:
{
}
,
// 折叠状态
checkAll
:
null
,
groupChecker
:
{
}
,
// 分组全选状态
inited
:
false
}
}
,
...
...
@@ -189,31 +190,25 @@ export default {
if
(
option
){
this
.
changeOption
()
}
}
,
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList
(){
this
.
selectedRoutes
=
[]
if
(
this
.
inited
)
this
.
selectedRoutes
=
[]
}
}
,
created
(){
getChannelList
().
then
(
res
=>
{
this
.
channelList
=
res
.
data
}
)
getTradeCityList
().
then
(
res
=>
{
this
.
tradeCityList
=
res
.
data
async
created
(){
this
.
channelList
=
(
await
getChannelList
()).
data
this
.
tradeCityList
=
(
await
getTradeCityList
()).
data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
this
.
getOpenedRouterList
()
}
)
if
(
this
.
value
&&
this
.
value
.
length
){
this
.
selectedRoutes
=
this
.
value
}
await
this
.
getOpenedRouterList
()
if
(
this
.
option
){
this
.
changeOption
()
}
await
this
.
$nextTick
()
if
(
this
.
value
&&
this
.
value
.
length
){
this
.
selectedRoutes
=
this
.
value
}
}
,
methods
:{
changeOption
(){
...
...
@@ -231,7 +226,7 @@ export default {
this
.
toggleChecker
(
router
,
selected
)
}
)
}
,
getOpenedRouterList
(){
async
getOpenedRouterList
(){
let
params
=
{
}
if
(
this
.
exportCity
){
params
.
startCityId
=
this
.
exportCity
...
...
@@ -239,9 +234,10 @@ export default {
if
(
this
.
importCity
){
params
.
destCityId
=
this
.
importCity
}
openedRouterList
(
params
).
then
(
res
=>
this
.
openedRouterList
=
res
.
data
.
filter
(
item
=>
{
const
res
=
await
openedRouterList
(
params
)
this
.
openedRouterList
=
res
.
data
.
filter
(
item
=>
{
return
this
.
exportCityIds
.
indexOf
(
item
.
startCityId
)
>
-
1
&&
this
.
importCityIds
.
indexOf
(
item
.
destCityId
)
>
-
1
}
)
)
}
)
}
,
// 切换路线选择
toggleChecker
(
router
,
selected
){
...
...
src/views/ecw/coupon/edit.vue
View file @
7bb311f1
...
...
@@ -198,7 +198,7 @@
>
<!---第一个不是全部,所以不能使用defaultable-->
<dict-selector
:type=
"DICT_TYPE.ECW_SUITABLE_LINE_TYPE"
v-model=
"form.suitableLineType"
formatter=
"number"
defaultable
/>
<routers-selector
v-if=
"showRouterSelector"
v-model=
"form.lineIds"
style=
"margin-top:5px"
/>
<routers-selector
v-if=
"showRouterSelector"
v-model=
"form.lineIds"
:lineIds=
"form.lineIds"
style=
"margin-top:5px"
/>
</el-form-item>
<el-form-item
:label=
"$t('适用商品')"
...
...
@@ -445,6 +445,7 @@ export default {
if
(
this
.
$route
.
query
.
id
)
{
this
.
initing
=
true
getCoupon
(
this
.
$route
.
query
.
id
).
then
((
res
)
=>
{
this
.
form
=
res
.
data
;
[
'
orderAttr
'
,
'
isCargoControl
'
,
'
brand
'
,
'
documentDeclaration
'
].
forEach
(
field
=>
{
this
.
$set
(
this
.
form
,
field
+
'
Arr
'
,
str2arr
(
res
.
data
[
field
]))
...
...
@@ -461,7 +462,7 @@ export default {
this
.
couponIds
=
couponIds
.
map
(
item
=>
parseInt
(
item
))
})
}
console
.
log
(
'
lineIds
'
,
this
.
form
.
lineIds
)
if
(
this
.
form
.
discountDetailedVOs
){
/* this[['clearanceFeeList', 'freightFeeList', 'discountList'][]] */
// this.fee[this.form.costType] = this.form.discountDetailedVOs.filter(item => item.type == this.form.costType)
...
...
@@ -477,7 +478,6 @@ export default {
this
.
fee
[
item
.
type
].
push
({...
item
})
})
console
.
log
(
JSON
.
stringify
(
this
.
fee
,
null
,
4
))
/* if(this.costType != this.form.costType){
console.error(`费用类型冲突,计算出来的类型为${this.costType},接口费用类型为${res.data.costType},类型为${res.data.type}`)
this.$alert(this.$t('费用类型冲突'))
...
...
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