Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄媛媛
ElectricitySheep
Commits
4cdce32f
Commit
4cdce32f
authored
Aug 17, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d9b40e3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
99 deletions
+33
-99
pintuanActive.vue
src/components/pintuan/pintuanActive.vue
+2
-4
distributePrice.vue
src/components/pintuan/pintuanPlugin/distributePrice.vue
+31
-95
No files found.
src/components/pintuan/pintuanActive.vue
View file @
4cdce32f
...
@@ -396,12 +396,10 @@
...
@@ -396,12 +396,10 @@
</groupStep>
</groupStep>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"分销价设置"
>
<el-tab-pane
label=
"分销价设置"
>
<distributePrice
v-if=
"TempSpecList&&TempSpecList.length>0"
:addMsg=
"addMsg"
:SpecList=
"TempSpecList"
<distributePrice
v-if=
"addMsg.SpecificationList&&addMsg.SpecificationList.length>0"
:addMsg=
"addMsg"
></distributePrice>
:SpecificationPriceList=
"TempGroupPriceList"
@
getDisCommission=
"getDisCommission"
></distributePrice>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"会员价设置"
>
<el-tab-pane
label=
"会员价设置"
>
<memberPrice
v-if=
"TempSpecList&&TempSpecList.length>0"
:addMsg=
"addMsg"
:SpecList=
"TempSpecList"
<memberPrice
v-if=
"addMsg.SpecificationList&&addMsg.SpecificationList.length>0"
:addMsg=
"addMsg"
></memberPrice>
:SpecificationPriceList=
"TempGroupPriceList"
@
getMemberList=
"getMemberList"
></memberPrice>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</el-row>
</el-row>
...
...
src/components/pintuan/pintuanPlugin/distributePrice.vue
View file @
4cdce32f
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<!--普通设置-->
<!--普通设置-->
<el-form-item
v-if=
"addMsg.SeparateDistributionType==1"
>
<el-form-item
v-if=
"addMsg.SeparateDistributionType==1"
>
<div
class=
"pintuan-share"
>
<div
class=
"pintuan-share"
>
<el-card
v-for=
"(item,index) in
Distributioncommission
List"
:key=
"index"
style=
"margin-bottom:20px;"
>
<el-card
v-for=
"(item,index) in
addMsg.Group
List"
:key=
"index"
style=
"margin-bottom:20px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
style=
"display:inline-block;"
>
<div
style=
"display:inline-block;"
>
...
@@ -46,7 +46,8 @@
...
@@ -46,7 +46,8 @@
<el-button
size=
"small"
type=
"primary"
@
click=
"setInfo(item,index)"
>
设置
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"setInfo(item,index)"
>
设置
</el-button>
</div>
</div>
<el-table
:ref=
"'multipleTable'+index"
:data=
"item.DistributioncommissionList"
tooltip-effect=
"dark"
<el-table
:ref=
"'multipleTable'+index"
:data=
"item.DistributioncommissionList"
tooltip-effect=
"dark"
style=
"width: 100%;border:1px solid #E8EAEE"
@
selection-change=
"(selections)=>
{handleSelectionChange(selections,index,item)}">
style=
"width: 100%;border:1px solid #E8EAEE"
@
selection-change=
"(selections)=>
{handleSelectionChange(selections,index,item)}">
<el-table-column
type=
"selection"
width=
"55"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"100"
label=
"等级名称"
>
<el-table-column
width=
"100"
label=
"等级名称"
>
...
@@ -93,8 +94,7 @@
...
@@ -93,8 +94,7 @@
<!--详细设置-->
<!--详细设置-->
<el-form-item
v-else
>
<el-form-item
v-else
>
<div
class=
"pintuan-share"
>
<div
class=
"pintuan-share"
>
<el-card
v-for=
"(rootItem,rootIndex) in DistributioncommissionList"
:key=
"rootIndex+500"
<el-card
v-for=
"(rootItem,rootIndex) in addMsg.GroupList"
:key=
"rootIndex+500"
style=
"margin-bottom:20px;"
>
style=
"margin-bottom:20px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
class=
"box"
>
<div
class=
"box"
>
<div
style=
"display:inline-block;"
>
<div
style=
"display:inline-block;"
>
...
@@ -114,11 +114,12 @@
...
@@ -114,11 +114,12 @@
</el-input>
</el-input>
<el-button
size=
"small"
type=
"primary"
@
click=
"setInfo(rootItem,rootIndex)"
>
设置
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"setInfo(rootItem,rootIndex)"
>
设置
</el-button>
</div>
</div>
<el-table
ref=
"multipleTable"
:data=
"rootItem.DistributioncommissionList"
tooltip-effect=
"dark"
<el-table
ref=
"multipleTable"
:data=
"rootItem.DistributionCommissionTreeList"
tooltip-effect=
"dark"
style=
"width: 100%;border:1px solid #E8EAEE"
@
selection-change=
"(selections)=>{handleSelectionChange(selections,rootIndex,rootItem)}"
>
style=
"width: 100%;border:1px solid #E8EAEE"
@
selection-change=
"(selections)=>{handleSelectionChange(selections,rootIndex,rootItem)}"
>
<el-table-column
type=
"selection"
width=
"55"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
</el-table-column>
<
template
v-for=
"(specItem, specIndex) in
Spec
List"
>
<
template
v-for=
"(specItem, specIndex) in
addMsg.Specification
List"
>
<el-table-column
:key=
"specIndex+'13'"
:label=
"specItem.Name"
width=
"100"
>
<el-table-column
:key=
"specIndex+'13'"
:label=
"specItem.Name"
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"specIndex == specValueIndex"
<span
v-if=
"specIndex == specValueIndex"
...
@@ -172,7 +173,7 @@
...
@@ -172,7 +173,7 @@
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
"
SpecificationPriceList"
,
"addMsg"
,
"SpecList
"
],
props
:
[
"
addMsg
"
],
data
()
{
data
()
{
return
{
return
{
fxVal
:
''
,
fxVal
:
''
,
...
@@ -189,87 +190,25 @@
...
@@ -189,87 +190,25 @@
//多选数组
//多选数组
selectList
:
[],
selectList
:
[],
CommonIndex
:
-
1
,
//选中index
CommonIndex
:
-
1
,
//选中index
};
};
},
},
watch
:
{
'SpecificationPriceList'
:
{
immediate
:
true
,
handler
:
function
(
val
,
oldval
)
{
console
.
log
(
"val"
,
this
.
SpecificationPriceList
);
if
(
val
!=
oldval
)
{
this
.
DistributioncommissionList
=
[];
if
(
this
.
SpecificationPriceList
&&
this
.
SpecificationPriceList
.
length
>
0
)
{
if
(
this
.
SpecificationPriceList
[
0
].
DistributioncommissionList
&&
this
.
SpecificationPriceList
[
0
]
.
DistributioncommissionList
.
length
>
0
)
{
this
.
SpecificationPriceList
.
forEach
(
item
=>
{
var
obj
=
{
People_Num
:
item
.
People_Num
,
DistributioncommissionList
:
item
.
DistributioncommissionList
,
Leavel
:
''
,
//层级
Number
:
0
,
//设置->金额/百分比
selectList
:[],
//选中数组
};
this
.
DistributioncommissionList
.
push
(
obj
);
})
this
.
$forceUpdate
();
}
else
if
(
this
.
SpecificationPriceList
[
0
].
DistributionCommissionTreeList
&&
this
.
SpecificationPriceList
[
0
].
DistributionCommissionTreeList
.
length
>
0
)
{
this
.
SpecificationPriceList
.
forEach
(
item
=>
{
var
obj
=
{
People_Num
:
item
.
People_Num
,
DistributioncommissionList
:
item
.
DistributionCommissionTreeList
,
Leavel
:
''
,
//层级
Number
:
0
,
//设置->金额/百分比
selectList
:[],
//选中数组
};
this
.
DistributioncommissionList
.
push
(
obj
);
console
.
log
(
this
.
DistributioncommissionList
,
'this.DistributioncommissionList'
);
})
this
.
$forceUpdate
();
}
else
{
this
.
checkedChange
();
}
}
else
{
this
.
checkedChange
();
}
}
}
},
"DistributioncommissionList"
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
$emit
(
'getDisCommission'
,
this
.
DistributioncommissionList
);
},
deep
:
true
},
},
created
()
{
},
methods
:
{
methods
:
{
//切换显示
//切换显示
checkedChange
()
{
checkedChange
()
{
this
.
DistributioncommissionList
=
[];
//普通设置
//普通设置
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
this
.
SpecificationPriceList
.
forEach
(
item
=>
{
this
.
addMsg
.
GroupList
.
forEach
(
item
=>
{
var
obj
=
{
item
.
DistributioncommissionList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempGeneralArray
))
People_Num
:
item
.
People_Num
,
DistributioncommissionList
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempGeneralArray
)),
};
this
.
DistributioncommissionList
.
push
(
obj
);
});
});
}
}
//详细设置
//详细设置
else
if
(
this
.
addMsg
.
SeparateDistributionType
==
2
)
{
else
if
(
this
.
addMsg
.
SeparateDistributionType
==
2
)
{
this
.
SpecificationPriceList
.
forEach
(
item
=>
{
this
.
addMsg
.
GroupList
.
forEach
(
item
=>
{
var
obj
=
{
item
.
DistributionCommissionTreeList
=
[];
People_Num
:
item
.
People_Num
,
DistributioncommissionList
:
[],
Leavel
:
''
,
//层级
Number
:
0
,
//设置->金额/百分比
selectList
:[],
//选中数组
}
item
.
StepPriceList
.
forEach
(
subItem
=>
{
item
.
StepPriceList
.
forEach
(
subItem
=>
{
var
tempObj
=
JSON
.
parse
(
JSON
.
stringify
(
subItem
));
var
tempObj
=
JSON
.
parse
(
JSON
.
stringify
(
subItem
));
var
commissionObj
=
{
var
commissionObj
=
{
...
@@ -288,18 +227,15 @@
...
@@ -288,18 +227,15 @@
}
}
commissionObj
.
GradeCommissionList
.
push
(
tempObj
);
commissionObj
.
GradeCommissionList
.
push
(
tempObj
);
});
});
obj
.
Distributioncommission
List
.
push
(
commissionObj
);
item
.
DistributionCommissionTree
List
.
push
(
commissionObj
);
});
});
this
.
DistributioncommissionList
.
push
(
obj
);
})
})
}
}
},
},
handleSelectionChange
(
val
,
index
,
item
)
{
handleSelectionChange
(
val
,
index
,
item
)
{
console
.
log
(
val
,
'val'
);
console
.
log
(
index
,
'index'
);
console
.
log
(
item
,
'item'
);
this
.
selectList
=
val
;
this
.
selectList
=
val
;
item
.
selectList
=
val
;
item
.
selectList
=
val
;
},
},
//获取分销层级
//获取分销层级
getDistributor
()
{
getDistributor
()
{
...
@@ -359,22 +295,22 @@
...
@@ -359,22 +295,22 @@
this
.
Error
(
'请选择分销层级'
);
this
.
Error
(
'请选择分销层级'
);
return
;
return
;
}
}
item
.
DistributioncommissionList
.
forEach
(
x
=>
{
item
.
DistributioncommissionList
.
forEach
(
x
=>
{
item
.
selectList
.
forEach
(
y
=>
{
item
.
selectList
.
forEach
(
y
=>
{
if
(
x
.
DistributorGrade
==
y
.
DistributorGrade
)
{
if
(
x
.
DistributorGrade
==
y
.
DistributorGrade
)
{
if
(
item
.
Leavel
==
1
)
{
if
(
item
.
Leavel
==
1
)
{
x
.
OneCommission
=
item
.
Number
x
.
OneCommission
=
item
.
Number
}
}
if
(
item
.
Leavel
==
2
)
{
if
(
item
.
Leavel
==
2
)
{
x
.
TwoCommission
=
item
.
Number
x
.
TwoCommission
=
item
.
Number
}
}
if
(
item
.
Leavel
==
3
)
{
if
(
item
.
Leavel
==
3
)
{
x
.
ThreeCommission
=
item
.
Number
x
.
ThreeCommission
=
item
.
Number
}
}
}
}
})
})
})
})
}
else
{
}
else
{
if
(
!
item
.
selectList
||
item
.
selectList
.
length
===
0
)
{
if
(
!
item
.
selectList
||
item
.
selectList
.
length
===
0
)
{
this
.
Error
(
'请勾选商品规格'
);
this
.
Error
(
'请勾选商品规格'
);
return
;
return
;
...
@@ -402,7 +338,7 @@
...
@@ -402,7 +338,7 @@
});
});
});
});
});
});
}
}
}
}
},
},
mounted
()
{
mounted
()
{
...
...
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