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
68fa0c12
Commit
68fa0c12
authored
Aug 14, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0a8e790a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
82 deletions
+99
-82
pintuanActive.vue
src/components/pintuan/pintuanActive.vue
+15
-1
distributePrice.vue
src/components/pintuan/pintuanPlugin/distributePrice.vue
+84
-81
No files found.
src/components/pintuan/pintuanActive.vue
View file @
68fa0c12
...
...
@@ -396,7 +396,7 @@
:SpecPriceList=
"TempSpecPriceList"
></groupStep>
</el-tab-pane>
<el-tab-pane
label=
"分销价设置"
>
<distributePrice
:shareGroup_list=
"TempGroupPriceList"
></distributePrice>
<distributePrice
v-if=
"TempSpecList&&TempSpecList.length>0"
:addMsg=
"addMsg"
:shareGroup_list=
"TempGroupPriceList"
></distributePrice>
</el-tab-pane>
<el-tab-pane
label=
"会员价设置"
>
<memberPrice
:SpecificationPriceList=
"TempSpecPriceList"
:SpecificationList=
"TempSpecList"
></memberPrice>
...
...
@@ -527,6 +527,9 @@
App_share_pic
:
''
,
//自定义分享图片
IsCustomSpecification
:
2
,
// 是否自定义规格 1是 2否
GroupList
:[],
//阶梯价格
SeparateDistribution
:
2
,
//是否开启单独分销 1是 2否
SeparateDistributionType
:
1
,
//单独分销类型 1普通设置 2详细设置
SeparateDistributionMoneyType
:
1
,
//分销佣金类型 2固定金额 1百分比
},
IsShowSpec
:
false
,
//是否显示规格
TempSpecList
:
[],
//规格列表
...
...
@@ -633,6 +636,17 @@
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
.
SeparateDistributionMoneyType
=
Mydata
.
SeparateDistributionMoneyType
;
if
(
this
.
addMsg
.
SeparateDistributionMoneyType
==
0
)
{
this
.
addMsg
.
SeparateDistributionMoneyType
=
2
}
this
.
IsShowSpec
=
true
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
...
...
src/components/pintuan/pintuanPlugin/distributePrice.vue
View file @
68fa0c12
...
...
@@ -10,31 +10,21 @@
<
template
>
<div>
<el-form-item
label=
"是否开启分销佣金"
size=
"small"
>
<el-switch
:active-value=
"1"
:inactive-value=
"
0"
v-model=
"msg.SeparateDistribution
"
>
<el-switch
:active-value=
"1"
:inactive-value=
"
2"
v-model=
"addMsg.SeparateDistribution"
@
change=
"checkedChange
"
>
</el-switch>
</el-form-item>
<template
v-if=
"
m
sg.SeparateDistribution == 1"
>
<template
v-if=
"
addM
sg.SeparateDistribution == 1"
>
<el-form-item
label=
"分销类型"
>
<el-radio
v-model=
"
msg.SeparateDistributionType"
:label=
"0
"
>
普通设置
</el-radio>
<el-radio
v-model=
"
msg.SeparateDistributionType"
:label=
"1
"
>
详细设置
</el-radio>
<el-radio
v-model=
"
addMsg.SeparateDistributionType"
:label=
"1"
@
change=
"checkedChange
"
>
普通设置
</el-radio>
<el-radio
v-model=
"
addMsg.SeparateDistributionType"
:label=
"2"
@
change=
"checkedChange
"
>
详细设置
</el-radio>
</el-form-item>
<el-form-item
label=
"分销佣金类型"
size=
"small"
>
<el-radio
v-model=
"
msg.SeparateDistributionMoneyType"
:label=
"0
"
>
固定金额
</el-radio>
<el-radio
v-model=
"
msg.SeparateDistributionMoneyType"
:label=
"1
"
>
百分比
</el-radio>
<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>
<!--
<template
v-if=
"sign !== 'pintuan'"
>
<app-goods-share
v-model=
"ruleForm"
:is_mch=
"is_mch"
:attr-groups=
"attrGroups"
:attr_setting_type=
"cForm.attr_setting_type"
:share_type=
"ruleForm.share_type"
:use_attr=
"ruleForm.use_attr"
:sign=
"sign"
pintuan_sign=
"单独购买"
></app-goods-share>
</
template
>
<
template
v-if=
"sign === 'pintuan' && cForm.is_alone_buy == 1"
>
<app-goods-share
v-model=
"ruleForm"
:is_mch=
"is_mch"
:attr-groups=
"attrGroups"
:attr_setting_type=
"ruleForm.attr_setting_type"
:share_type=
"ruleForm.share_type"
:use_attr=
"ruleForm.use_attr"
:sign=
"sign"
pintuan_sign=
"单独购买"
></app-goods-share>
</
template
>
-->
<el-form-item>
<div
class=
"pintuan-share"
>
<el-card
v-for=
"(item,index) in
shareGroup_l
ist"
:key=
"index"
style=
"margin-bottom:20px;"
>
<el-card
v-for=
"(item,index) in
DistributioncommissionL
ist"
:key=
"index"
style=
"margin-bottom:20px;"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
class=
"box"
>
<div
style=
"display:inline-block;"
>
...
...
@@ -42,19 +32,19 @@
</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 butor
Int
"
:label=
"`${index + 1}级分销`"
:value=
"index + 1"
<el-option
v-for=
"(item, index) in butor
Tier
"
: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=
"
m
sg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"
m
sg.SeparateDistributionMoneyType == 1"
>
%
</span>
<span
v-if=
"
addM
sg.SeparateDistributionMoneyType == 2"
>
元
</span>
<span
v-if=
"
addM
sg.SeparateDistributionMoneyType == 1"
>
%
</span>
</el-button>
</el-input>
<el-button
size=
"small"
type=
"primary"
>
设置
</el-button>
</div>
<el-table
ref=
"multipleTable"
:data=
"
GradeC
ommissionList"
tooltip-effect=
"dark"
<el-table
ref=
"multipleTable"
:data=
"
item.Distributionc
ommissionList"
tooltip-effect=
"dark"
style=
"width: 100%;border:1px solid #E8EAEE"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
...
...
@@ -73,30 +63,30 @@
<el-input
v-model=
"scope.row.OneCommission"
v-if=
"index == 0"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
m
sg.SeparateDistributionMoneyType == 2
addM
sg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
m
sg.SeparateDistributionMoneyType == 1
addM
sg.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=
"
m
sg.SeparateDistributionMoneyType == 2
addM
sg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
m
sg.SeparateDistributionMoneyType == 1
addM
sg.SeparateDistributionMoneyType == 1
"
>
%
</span>
</el-button>
</el-input>
<el-input
v-model=
"scope.row.ThreeCommission"
v-if=
"index == 2"
size=
"small"
>
<el-button
slot=
"append"
>
<span
v-if=
"
m
sg.SeparateDistributionMoneyType == 2
addM
sg.SeparateDistributionMoneyType == 2
"
>
元
</span>
<span
v-if=
"
m
sg.SeparateDistributionMoneyType == 1
addM
sg.SeparateDistributionMoneyType == 1
"
>
%
</span>
</el-button>
</el-input>
...
...
@@ -114,39 +104,71 @@
</template>
<
script
>
export
default
{
props
:
[
"shareGroup_list"
],
props
:
[
"shareGroup_list"
,
"addMsg"
],
data
()
{
return
{
fxVal
:
''
,
butorInt
:
0
,
butorTier
:
0
,
//分销层级
//获取分销商等级
butorIntList
:
[],
GradeCommissionList
:[],
DropdownList
:[],
msg
:
{
SeparateDistribution
:
0
,
//是否开启分销佣金
SeparateDistributionType
:
1
,
//分销类型
SeparateDistributionMoneyType
:
1
,
//分销佣金类型
},
DropdownList
:
[],
DistributioncommissionList
:
[],
tableData
:
[{
leval
:
'默认等级'
,
yiji
:
0
,
erji
:
3
}]
}],
//普通设置数组
tempGeneralArray
:
[],
};
},
watch
:
{
'shareGroup_list'
:
{
handler
:
function
(
val
,
oldval
)
{
if
(
val
!=
oldval
)
{
this
.
checkedChange
()
}
},
},
},
created
()
{
console
.
log
(
"shareGroup_list"
,
this
.
shareGroup_list
);
},
methods
:
{
//切换显示
checkedChange
()
{
this
.
DistributioncommissionList
=
[];
//普通设置
if
(
this
.
addMsg
.
SeparateDistributionType
==
1
)
{
this
.
shareGroup_list
.
forEach
(
item
=>
{
var
obj
=
{
People_Num
:
item
.
People_Num
,
DistributioncommissionList
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempGeneralArray
)),
};
this
.
DistributioncommissionList
.
push
(
obj
);
});
}
//详细设置
else
if
(
this
.
addMsg
.
SeparateDistributionType
==
2
)
{
this
.
shareGroup_list
.
forEach
(
item
=>
{
var
obj
=
{
People_Num
:
item
.
People_Num
,
}
})
}
console
.
log
(
"this.DistributioncommissionList"
,
this
.
DistributioncommissionList
);
},
handleSelectionChange
()
{
},
//获取分销层级
getDistributor
()
{
this
.
apipost
(
"/api/user/GetDistributorBasicsInfo"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
butor
Int
=
res
.
data
.
data
.
DistributorTier
;
this
.
butor
Tier
=
res
.
data
.
data
.
DistributorTier
;
this
.
butorIntList
=
[];
for
(
let
i
=
0
;
i
<
this
.
butor
Int
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
butor
Tier
;
i
++
)
{
let
msg
=
{
Name
:
i
+
1
+
"级分销"
};
...
...
@@ -155,57 +177,38 @@
}
});
},
//获取分销等级
GetDropdownList
()
{
let
msg
=
{
let
q
msg
=
{
Id
:
0
,
Grade
:
0
,
Name
:
""
,
Enabled
:
1
};
this
.
apipost
(
"/api/user/GetDistributorGradeDropdownList"
,
msg
,
res
=>
{
this
.
apipost
(
"/api/user/GetDistributorGradeDropdownList"
,
q
msg
,
res
=>
{
this
.
DropdownList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
data
));
let
msg
=
{
Grade
:
0
,
GradeCommissionList
:
[]
,
let
disPriceObj
=
{
Id
:
0
,
DistributorGrade
:
0
,
Name
:
"默认等级"
,
SpecificationSort
:
""
,
Id
:
0
};
this
.
DropdownList
.
unshift
(
msg
);
this
.
DropdownList
.
unshift
(
disPriceObj
);
this
.
DropdownList
.
forEach
(
item
=>
{
item
.
GradeCommissionList
=
[];
item
.
SpecificationSort
=
""
;
for
(
let
i
=
0
;
i
<
this
.
butorInt
;
i
++
)
{
let
obj
=
{
DistributorGrade
:
item
.
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
};
item
.
GradeCommissionList
.
push
(
obj
);
}
});
this
.
DropdownList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
DropdownList
));
if
(
!
this
.
$route
.
query
.
Id
){
this
.
GradeCommissionList
=
[];
this
.
DropdownList
.
forEach
(
item
=>
{
let
obj2
=
{
Id
:
0
,
Name
:
item
.
Name
,
DistributorGrade
:
item
.
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
,
Name
:
item
.
Name
SpecificationSort
:
""
,
};
this
.
GradeCommissionList
.
push
(
obj2
);
this
.
tempGeneralArray
.
push
(
obj
);
console
.
log
(
"this.tempGeneralArray"
,
this
.
tempGeneralArray
);
});
this
.
GradeCommissionList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
GradeCommissionList
)
);
}
});
},
},
mounted
()
{
this
.
getDistributor
();
...
...
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