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
2ff203f2
Commit
2ff203f2
authored
Aug 14, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
67eefd53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
142 additions
and
52 deletions
+142
-52
pintuanActive.vue
src/components/pintuan/pintuanActive.vue
+38
-27
distributePrice.vue
src/components/pintuan/pintuanPlugin/distributePrice.vue
+104
-25
No files found.
src/components/pintuan/pintuanActive.vue
View file @
2ff203f2
...
...
@@ -392,11 +392,12 @@
</el-card>
</el-tab-pane>
<el-tab-pane
label=
"阶梯团设置"
>
<groupStep
v-if=
"TempSpecList&&TempSpecList.length>0"
@
setNewVal=
"setNewVal"
:SpecList=
"TempSpecList"
:GroupPriceList=
"TempGroupPrice
List"
:SpecPriceList=
"TempSpecPriceList"
></groupStep>
<groupStep
v-if=
"TempSpecList&&TempSpecList.length>0"
@
setNewVal=
"setNewVal"
:SpecList=
"TempSpec
List"
:
GroupPriceList=
"TempGroupPriceList"
:
SpecPriceList=
"TempSpecPriceList"
></groupStep>
</el-tab-pane>
<el-tab-pane
label=
"分销价设置"
>
<distributePrice
v-if=
"TempSpecList&&TempSpecList.length>0"
:addMsg=
"addMsg"
:shareGroup_list=
"TempGroupPriceList"
></distributePrice>
<distributePrice
v-if=
"TempSpecList&&TempSpecList.length>0"
:addMsg=
"addMsg"
:SpecList=
"TempSpecList"
:shareGroup_list=
"TempGroupPriceList"
@
getDisCommission=
"getDisCommission"
></distributePrice>
</el-tab-pane>
<el-tab-pane
label=
"会员价设置"
>
<memberPrice
:SpecificationPriceList=
"TempSpecPriceList"
:SpecificationList=
"TempSpecList"
></memberPrice>
...
...
@@ -526,10 +527,10 @@
App_share_title
:
''
,
//自定义分享标题、
App_share_pic
:
''
,
//自定义分享图片
IsCustomSpecification
:
2
,
// 是否自定义规格 1是 2否
GroupList
:
[],
//阶梯价格
SeparateDistribution
:
2
,
//是否开启单独分销 1是 2否
SeparateDistributionType
:
1
,
//单独分销类型 1普通设置 2详细设置
SeparateDistributionMoneyType
:
1
,
//分销佣金类型 2固定金额 1百分比
GroupList
:
[],
//阶梯价格
SeparateDistribution
:
2
,
//是否开启单独分销 1是 2否
SeparateDistributionType
:
1
,
//单独分销类型 1普通设置 2详细设置
SeparateDistributionMoneyType
:
1
,
//分销佣金类型 2固定金额 1百分比
},
IsShowSpec
:
false
,
//是否显示规格
TempSpecList
:
[],
//规格列表
...
...
@@ -550,18 +551,18 @@
formName
:
''
,
imgDialog
:
false
,
rules
:
{
StartTime
:[{
StartTime
:
[{
required
:
true
,
message
:
"请选择开始时间"
,
trigger
:
"change"
}],
EndTime
:[{
required
:
true
,
EndTime
:
[{
required
:
true
,
message
:
"请选择结束时间"
,
trigger
:
"change"
}],
name
:[{
required
:
true
,
name
:
[{
required
:
true
,
message
:
"请选择商品"
,
trigger
:
"blur"
}]
...
...
@@ -631,21 +632,19 @@
this
.
addMsg
.
SpecificationPriceList
=
Mydata
.
SpecificationPriceList
;
//规格列表赋值
this
.
TempSpecPriceList
=
JSON
.
parse
(
JSON
.
stringify
(
Mydata
.
SpecificationPriceList
));
}
if
(
Mydata
.
GroupList
&&
Mydata
.
GroupList
.
length
>
0
)
{
this
.
addMsg
.
GroupList
=
Mydata
.
GroupList
;
this
.
TempGroupPriceList
=
Mydata
.
GroupList
;
}
this
.
addMsg
.
SeparateDistribution
=
Mydata
.
SeparateDistribution
;
this
.
addMsg
.
SeparateDistributionType
=
Mydata
.
SeparateDistributionType
;
if
(
this
.
addMsg
.
SeparateDistributionType
==
0
)
{
this
.
addMsg
.
SeparateDistributionType
=
1
;
this
.
addMsg
.
SeparateDistribution
=
Mydata
.
SeparateDistribution
;
this
.
addMsg
.
SeparateDistributionType
=
Mydata
.
SeparateDistributionType
;
if
(
this
.
addMsg
.
SeparateDistributionType
==
0
)
{
this
.
addMsg
.
SeparateDistributionType
=
1
;
}
this
.
addMsg
.
SeparateDistributionMoneyType
=
Mydata
.
SeparateDistributionMoneyType
;
if
(
this
.
addMsg
.
SeparateDistributionMoneyType
==
0
)
{
this
.
addMsg
.
SeparateDistributionMoneyType
=
2
this
.
addMsg
.
SeparateDistributionMoneyType
=
Mydata
.
SeparateDistributionMoneyType
;
if
(
this
.
addMsg
.
SeparateDistributionMoneyType
==
0
)
{
this
.
addMsg
.
SeparateDistributionMoneyType
=
2
;
}
this
.
IsShowSpec
=
true
;
}
else
{
...
...
@@ -790,12 +789,10 @@
this
.
imgDialog
=
false
;
},
//设置阶梯价格
setNewVal
(
val
){
var
tempObj
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
this
.
TempGroupPriceList
=
tempObj
;
setNewVal
(
val
)
{
var
tempObj
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
this
.
TempGroupPriceList
=
tempObj
;
this
.
addMsg
.
GroupList
=
tempObj
;
},
//获取子组件规格
getSpecList
(
val
)
{
...
...
@@ -804,6 +801,20 @@
//获取子组件规格价格列表
getSpecPriceList
(
val
)
{
this
.
addMsg
.
SpecificationPriceList
=
val
;
},
getDisCommission
(
disCommissionArray
)
{
if
(
this
.
addMsg
.
GroupList
&&
this
.
addMsg
.
GroupList
.
length
>
0
)
{
this
.
addMsg
.
GroupList
.
forEach
(
item
=>
{
if
(
disCommissionArray
&&
disCommissionArray
.
length
>
0
)
{
disCommissionArray
.
forEach
(
subItem
=>
{
if
(
item
.
People_Num
==
subItem
.
People_Num
)
{
item
.
DistributioncommissionList
=
subItem
.
DistributioncommissionList
;
}
})
}
})
}
console
.
log
(
" this.addMsg.GroupList"
,
this
.
addMsg
.
GroupList
);
}
}
};
...
...
src/components/pintuan/pintuanPlugin/distributePrice.vue
View file @
2ff203f2
...
...
@@ -22,7 +22,8 @@
<el-radio
v-model=
"addMsg.SeparateDistributionMoneyType"
:label=
"2"
@
change=
"checkedChange"
>
固定金额
</el-radio>
<el-radio
v-model=
"addMsg.SeparateDistributionMoneyType"
:label=
"1"
@
change=
"checkedChange"
>
百分比
</el-radio>
</el-form-item>
<el-form-item>
<!--普通设置-->
<el-form-item
v-if=
"addMsg.SeparateDistributionType==1"
>
<div
class=
"pintuan-share"
>
<el-card
v-for=
"(item,index) in DistributioncommissionList"
:key=
"index"
style=
"margin-bottom:20px;"
>
<div
slot=
"header"
class=
"clearfix"
>
...
...
@@ -55,39 +56,26 @@
</
template
>
</template>
</el-table-column>
<
template
v-for=
"(item, index) in butorIntList"
>
<el-table-column
:key=
"index+'10'"
:label=
"item.Name"
>
<template
slot-scope=
"scope"
>
<span>
<el-input
v-model=
"scope.row.OneCommission"
v-if=
"index == 0"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 1
"
>
%
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 1"
>
%
</span>
</el-button>
</el-input>
<el-input
v-model=
"scope.row.TwoCommission"
v-if=
"index == 1"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 1
"
>
%
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 1"
>
%
</span>
</el-button>
</el-input>
<el-input
v-model=
"scope.row.ThreeCommission"
v-if=
"index
==
2"
size=
"small"
>
<el-input
v-model=
"scope.row.ThreeCommission"
v-if=
"index
==
2"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
addMsg.SeparateDistributionMoneyType == 1
"
>
%
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 1"
>
%
</span>
</el-button>
</el-input>
</span>
...
...
@@ -99,19 +87,82 @@
</el-card>
</div>
</el-form-item>
<!--详细设置-->
<el-form-item
v-if=
"addMsg.SeparateDistributionType == 2"
>
<div
class=
"pintuan-share"
>
<el-card
v-for=
"(item,index) in DistributioncommissionList"
:key=
"index"
style=
"margin-bottom:20px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
class=
"box"
>
<div
style=
"display:inline-block;"
>
<el-tag
type=
"danger"
>
{{item.People_Num}}人团
</el-tag>
</div>
<label
style=
"margin-bottom:0;padding:18px 10px;"
>
批量设置
</label>
<el-select
placeholder=
"请选择层级"
v-model=
"fxVal"
style=
"width:130px;"
size=
"small"
>
<el-option
v-for=
"(item, index) in butorTier"
:label=
"`${index + 1}级分销`"
:value=
"index + 1"
:key=
"index+'12'"
>
</el-option>
</el-select>
<el-input
type=
"text"
size=
"small"
style=
"width:150px;margin-top:5px;"
>
<el-button
slot=
"append"
>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"addMsg.SeparateDistributionMoneyType == 1"
>
%
</span>
</el-button>
</el-input>
<el-button
size=
"small"
type=
"primary"
>
设置
</el-button>
</div>
<el-table
ref=
"multipleTable"
:data=
"item.DistributioncommissionList"
tooltip-effect=
"dark"
style=
"width: 100%;border:1px solid #E8EAEE"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<
template
v-for=
"(specItem, specIndex) in SpecList"
>
<el-table-column
:key=
"specIndex+'13'"
:label=
"specItem.Name"
width=
"100"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"specIndex == specValueIndex"
v-for=
"(specValueItem, specValueIndex) in scope.row.AttrList"
:key=
"specValueIndex+'14'"
>
{{
scope
.
row
.
AttrList
[
specValueIndex
].
SVName
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-for=
"(item, index3) in DropdownList"
>
<el-table-column
:key=
"index3"
:label=
"item.Name"
>
<el-table-column
width=
"100"
v-if=
"butorTier > 0"
label=
"一级分销"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.GradeCommissionList[index3].OneCommission"
size=
"small"
></el-input>
</
template
>
</el-table-column>
<el-table-column
width=
"100"
v-if=
"butorTier > 1"
label=
"二级分销"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.GradeCommissionList[index3].TwoCommission"
size=
"small"
></el-input>
</
template
>
</el-table-column>
<el-table-column
width=
"100"
v-if=
"butorTier > 2"
label=
"三级分销"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.GradeCommissionList[index3].ThreeCommission"
size=
"small"
></el-input>
</
template
>
</el-table-column>
</el-table-column>
</template>
</el-table>
</div>
</el-card>
</div>
</el-form-item>
</template>
</div>
</template>
<
script
>
export
default
{
props
:
[
"shareGroup_list"
,
"addMsg"
],
props
:
[
"shareGroup_list"
,
"addMsg"
,
"SpecList"
],
data
()
{
return
{
fxVal
:
''
,
gradeVal
:
""
,
xxVal
:
""
,
butorTier
:
0
,
//分销层级
//
获取
分销商等级
//分销商等级
butorIntList
:
[],
//分销等级列表
DropdownList
:
[],
DistributioncommissionList
:
[],
tableData
:
[{
...
...
@@ -129,7 +180,13 @@
if
(
val
!=
oldval
)
{
this
.
checkedChange
()
}
}
},
"DistributioncommissionList"
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
$emit
(
'getDisCommission'
,
this
.
DistributioncommissionList
);
},
deep
:
true
},
},
created
()
{
...
...
@@ -138,6 +195,7 @@
methods
:
{
//切换显示
checkedChange
()
{
console
.
log
(
"tempGeneralArray,"
,
this
.
tempGeneralArray
)
this
.
DistributioncommissionList
=
[];
//普通设置
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
...
...
@@ -154,7 +212,29 @@
this
.
shareGroup_list
.
forEach
(
item
=>
{
var
obj
=
{
People_Num
:
item
.
People_Num
,
DistributioncommissionList
:
[],
}
item
.
StepPriceList
.
forEach
(
subItem
=>
{
var
tempObj
=
JSON
.
parse
(
JSON
.
stringify
(
subItem
));
var
commissionObj
=
{
AttrList
:
tempObj
.
AttrList
,
Id
:
0
,
Name
:
0
,
SpecificationSort
:
tempObj
.
SpecificationSort
,
GradeCommissionList
:
[],
};
this
.
tempGeneralArray
.
forEach
(
childItem
=>
{
commissionObj
.
GradeCommissionList
.
push
({
DistributorGrade
:
childItem
.
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
,
});
});
obj
.
DistributioncommissionList
.
push
(
commissionObj
);
});
this
.
DistributioncommissionList
.
push
(
obj
);
})
}
console
.
log
(
"this.DistributioncommissionList"
,
this
.
DistributioncommissionList
);
...
...
@@ -205,7 +285,6 @@
SpecificationSort
:
""
,
};
this
.
tempGeneralArray
.
push
(
obj
);
console
.
log
(
"this.tempGeneralArray"
,
this
.
tempGeneralArray
);
});
});
},
...
...
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