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
8fab4aa2
Commit
8fab4aa2
authored
Aug 11, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huangyuanyuan/electricitysheep
parents
56f508a5
21fe5904
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
954 additions
and
145 deletions
+954
-145
goodsListEdit.vue
src/components/CommodityMan/goodsListEdit.vue
+1
-1
choiceGood.vue
src/components/common/choiceGood.vue
+38
-10
pintuanActive.vue
src/components/pintuan/pintuanActive.vue
+309
-96
pintuanList.vue
src/components/pintuan/pintuanList.vue
+1
-2
distributePrice.vue
src/components/pintuan/pintuanPlugin/distributePrice.vue
+118
-0
goodsSpecifica.vue
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
+49
-32
ladderGroup.vue
src/components/pintuan/pintuanPlugin/ladderGroup.vue
+198
-0
priceAndGroup.vue
src/components/pintuan/pintuanPlugin/priceAndGroup.vue
+236
-0
goods.vue
src/components/sallCenter/plugin/goods.vue
+2
-2
pluginCenter.vue
src/components/sallCenter/pluginCenter.vue
+2
-2
No files found.
src/components/CommodityMan/goodsListEdit.vue
View file @
8fab4aa2
...
@@ -962,7 +962,7 @@
...
@@ -962,7 +962,7 @@
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"
addMsg.ServiceList = keepServiceList
"
size=
"small"
>
取消
</el-button>
<el-button
@
click=
"
(addMsg.ServiceList = keepServiceList),(serviceDig = false)
"
size=
"small"
>
取消
</el-button>
<el-button
@
click=
"(addMsg.ServiceList = checkService), (serviceDig = false)"
size=
"small"
type=
"primary"
>
确定
<el-button
@
click=
"(addMsg.ServiceList = checkService), (serviceDig = false)"
size=
"small"
type=
"primary"
>
确定
</el-button>
</el-button>
</span>
</span>
...
...
src/components/common/choiceGood.vue
View file @
8fab4aa2
...
@@ -6,8 +6,18 @@
...
@@ -6,8 +6,18 @@
</el-input>
</el-input>
<el-table
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
height=
"450"
style=
"width: 100%"
<el-table
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
height=
"450"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50px"
>
<template
v-if=
"isSingle"
>
</el-table-column>
<el-table-column
width=
"50px"
label=
""
>
<template
slot-scope=
"scope"
>
<el-radio
v-model=
"scope.row.IsChecked"
@
change
.
native=
"getTemplateRow(scope.$index,scope.row)"
>
</el-radio>
</
template
>
</el-table-column>
</template>
<
template
v-else
>
<el-table-column
type=
"selection"
width=
"50px"
>
</el-table-column>
</
template
>
<el-table-column
label=
"ID"
width=
"80px"
>
<el-table-column
label=
"ID"
width=
"80px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
Id
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
Id
}}
</
template
>
</el-table-column>
</el-table-column>
...
@@ -34,7 +44,7 @@
...
@@ -34,7 +44,7 @@
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'ckGoods'
],
props
:
[
'ckGoods'
,
"isSingle"
,
"IsGetSpec"
],
data
()
{
data
()
{
return
{
return
{
dataList
:
[],
dataList
:
[],
...
@@ -42,32 +52,50 @@
...
@@ -42,32 +52,50 @@
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
15
,
pageSize
:
15
,
Name
:
''
,
Name
:
''
,
GoodsStatus
:
1
//上架中
GoodsStatus
:
1
,
//上架中
IsGetSpec
:
0
},
},
total
:
0
,
total
:
0
,
selectRow
:
[],
selectRow
:
[],
};
};
},
},
created
()
{},
created
()
{
if
(
this
.
IsGetSpec
)
{
this
.
msg
.
IsGetSpec
=
this
.
IsGetSpec
;
}
},
methods
:
{
methods
:
{
//获取所有菜单
//获取所有菜单
getList
()
{
getList
()
{
this
.
apipost
(
"/api/product/GetProductGoodsDialogList"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"/api/product/GetProductGoodsDialogList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
this
.
total
=
res
.
data
.
data
.
count
;
this
.
dataList
=
res
.
data
.
data
.
pageData
;
var
tempArray
=
res
.
data
.
data
.
pageData
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
(
item
=>
{
item
.
IsChecked
=
false
;
});
}
this
.
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
tempArray
));
}
else
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
this
.
Info
(
res
.
data
.
message
);
}
}
})
})
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
// if(val.length>this.ckGoods){
// this.Info('超过了');
// val=val.slice(0,this.ckGoods);
// }
this
.
selectRow
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
this
.
selectRow
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
},
},
getTemplateRow
(
index
,
row
)
{
this
.
selectRow
=
[];
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
Id
!=
row
.
Id
)
{
item
.
IsChecked
=
false
;
}
})
}
this
.
selectRow
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
row
)));
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
this
.
getList
();
...
...
src/components/pintuan/pintuanActive.vue
View file @
8fab4aa2
This diff is collapsed.
Click to expand it.
src/components/pintuan/pintuanList.vue
View file @
8fab4aa2
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"Goods_
s
tock"
label=
"库存"
>
<el-table-column
prop=
"Goods_
S
tock"
label=
"库存"
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"活动时间"
>
<el-table-column
label=
"活动时间"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -136,7 +136,6 @@
...
@@ -136,7 +136,6 @@
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
apipost
(
"/api/GroupBuy/GetGroupbuyActivityPageList"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"/api/GroupBuy/GetGroupbuyActivityPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
console
.
log
(
"res"
,
res
);
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
let
pageData
=
res
.
data
.
data
.
pageData
;
...
...
src/components/pintuan/pintuanPlugin/distributePrice.vue
0 → 100644
View file @
8fab4aa2
<
style
>
.pintuan-share
.box
{
border-top
:
1px
solid
#E8EAEE
;
border-left
:
1px
solid
#E8EAEE
;
border-right
:
1px
solid
#E8EAEE
;
padding
:
16px
;
}
</
style
>
<
template
>
<div>
<el-form-item
label=
"是否开启分销佣金"
prop=
"individual_share"
>
<el-switch
:active-value=
"1"
:inactive-value=
"0"
v-model=
"msg.individual_share"
>
</el-switch>
</el-form-item>
<template
v-if=
"msg.individual_share == 1"
>
<!--
<el-form-item
label=
"分销类型"
prop=
"attr_setting_type"
v-if=
"cForm.use_attr == 1 && ruleForm.type == 'goods'"
>
<el-radio
v-model=
"ruleForm.attr_setting_type"
:label=
"0"
>
普通设置
</el-radio>
<el-radio
v-model=
"ruleForm.attr_setting_type"
:label=
"1"
>
详细设置
</el-radio>
</el-form-item>
-->
<el-form-item
label=
"分销佣金类型"
prop=
"share_type"
>
<el-radio
v-model=
"msg.share_type"
:label=
"0"
>
固定金额
</el-radio>
<el-radio
v-model=
"msg.share_type"
:label=
"1"
>
百分比
</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>
<div
slot=
"header"
class=
"clearfix"
>
<div
class=
"box"
>
<div
style=
"display:inline-block;"
>
<el-tag
type=
"danger"
>
3人团
</el-tag>
</div>
<label
style=
"margin-bottom:0;padding:18px 10px;"
>
批量设置
</label>
<el-select
placeholder=
"请选择层级"
v-model=
"fenxiao"
style=
"width:130px;"
size=
"small"
>
<el-option
label=
"一级分销"
:value=
"1"
></el-option>
<el-option
label=
"二级分销"
:value=
"2"
></el-option>
</el-select>
<el-input
type=
"text"
size=
"small"
style=
"width:150px;margin-top:5px;"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
<el-button
size=
"small"
type=
"primary"
>
设置
</el-button>
</div>
<el-table
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%;border:1px solid #E8EAEE"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"等级名称"
prop=
"leval"
width=
"100"
>
</el-table-column>
<el-table-column
label=
"一级分销"
width=
"576"
>
<
template
slot-scope=
"scope"
>
<el-input
type=
"text"
size=
"small"
v-model=
"scope.row.yiji"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"二级分销"
width=
"575"
>
<
template
slot-scope=
"scope"
>
<el-input
type=
"text"
size=
"small"
v-model=
"scope.row.erji"
>
<el-button
slot=
"append"
>
元
</el-button>
</el-input>
</
template
>
</el-table-column>
</el-table>
</div>
</el-card>
</div>
</el-form-item>
</template>
</div>
</template>
<
script
>
export
default
{
props
:
{
},
data
()
{
return
{
fenxiao
:
0
,
msg
:
{
individual_share
:
1
,
share_type
:
0
},
tableData
:[
{
leval
:
'默认等级'
,
yiji
:
0
,
erji
:
3
}
]
};
},
created
()
{
},
methods
:
{
handleSelectionChange
(){
}
},
mounted
()
{
},
computed
:
{
},
};
</
script
>
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
View file @
8fab4aa2
...
@@ -25,10 +25,12 @@
...
@@ -25,10 +25,12 @@
border
:
1px
solid
#ebeef5
;
border
:
1px
solid
#ebeef5
;
padding
:
10px
;
padding
:
10px
;
}
}
.speciDig
.tpl-box
{
.speciDig
.tpl-box
{
width
:
300px
;
width
:
300px
;
height
:
440px
;
height
:
440px
;
}
}
.speciDig
.tpl-box
.tpl-head
{
.speciDig
.tpl-box
.tpl-head
{
padding
:
0
20px
;
padding
:
0
20px
;
font-size
:
15px
;
font-size
:
15px
;
...
@@ -36,11 +38,13 @@
...
@@ -36,11 +38,13 @@
margin-bottom
:
10px
;
margin-bottom
:
10px
;
line-height
:
44px
;
line-height
:
44px
;
background
:
#f5f7fa
;
background
:
#f5f7fa
;
}
}
.speciDig
.tpl-scrollbar
{
.speciDig
.tpl-scrollbar
{
height
:
calc
(
440px
-
44px
-
10px
);
height
:
calc
(
440px
-
44px
-
10px
);
}
}
.speciDig
.tpl-scrollbar
.el-checkbox
{
.speciDig
.tpl-scrollbar
.el-checkbox
{
display
:
-webkit-box
;
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
-ms-flexbox
;
display
:
flex
;
display
:
flex
;
...
@@ -48,35 +52,39 @@
...
@@ -48,35 +52,39 @@
-ms-flex-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
align-items
:
center
;
padding
:
10px
0
;
padding
:
10px
0
;
}
}
.goodsSpecifica
.app-attr-group
.attr-list
{
.goodsSpecifica
.app-attr-group
.attr-list
{
display
:
inline-block
;
display
:
inline-block
;
margin-right
:
10px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
position
:
relative
;
position
:
relative
;
}
}
.goodsSpecifica
.app-attr-group
.close
{
.goodsSpecifica
.app-attr-group
.close
{
position
:
absolute
;
position
:
absolute
;
top
:
-4px
;
top
:
-4px
;
right
:
-4px
;
right
:
-4px
;
font-size
:
16px
;
font-size
:
16px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.goodsSpecifica
.box-grow-0
{
.goodsSpecifica
.box-grow-0
{
min-width
:
0
;
min-width
:
0
;
-webkit-box-flex
:
0
;
-webkit-box-flex
:
0
;
flex-grow
:
0
;
flex-grow
:
0
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.goodsSpecifica
.app-attr-group
.img-box
{
.goodsSpecifica
.app-attr-group
.img-box
{
position
:
relative
;
position
:
relative
;
height
:
100px
;
height
:
100px
;
width
:
100px
;
width
:
100px
;
margin-top
:
8px
;
margin-top
:
8px
;
border
:
1px
solid
#ebeef5
;
border
:
1px
solid
#ebeef5
;
}
}
.goodsSpecifica
.app-attr-group
.attr-jt
{
.goodsSpecifica
.app-attr-group
.attr-jt
{
background
:
#ffffff
;
background
:
#ffffff
;
width
:
6px
;
width
:
6px
;
height
:
6px
;
height
:
6px
;
...
@@ -89,7 +97,8 @@
...
@@ -89,7 +97,8 @@
-ms-transform
:
rotate
(
-45deg
);
-ms-transform
:
rotate
(
-45deg
);
position
:
absolute
;
position
:
absolute
;
top
:
-5px
;
top
:
-5px
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
...
@@ -116,9 +125,8 @@
...
@@ -116,9 +125,8 @@
<i
@
click=
"Deleteggz(item, index, index2)"
class=
"el-icon-error close"
></i>
<i
@
click=
"Deleteggz(item, index, index2)"
class=
"el-icon-error close"
></i>
<div
v-if=
"index == 0 && item.EnabledImage == 1"
flex=
"cross:center main:center"
class=
"img-box"
>
<div
v-if=
"index == 0 && item.EnabledImage == 1"
flex=
"cross:center main:center"
class=
"img-box"
>
<div
class=
"attr-jt"
></div>
<div
class=
"attr-jt"
></div>
<div
v-if=
"item2.Image == ''"
@
click=
"
<div
v-if=
"item2.Image == ''"
@
click=
" openggImg(item, index, item2, index2) "
openggImg(item, index, item2, index2)
class=
"app-attachment"
>
"
class=
"app-attachment"
>
<div
style=
"line-height: normal; display: inline-block;"
>
<div
style=
"line-height: normal; display: inline-block;"
>
<span>
+添加图片
</span>
<span>
+添加图片
</span>
</div>
</div>
...
@@ -126,14 +134,12 @@
...
@@ -126,14 +134,12 @@
<div
v-if=
"item2.Image != ''"
class=
"el-image"
style=
"height: 88px; width: 88px;"
>
<div
v-if=
"item2.Image != ''"
class=
"el-image"
style=
"height: 88px; width: 88px;"
>
<img
:src=
"item2.Image"
style=
"width:100%;height:100%"
/>
<img
:src=
"item2.Image"
style=
"width:100%;height:100%"
/>
</div>
</div>
<span
v-if=
"item2.Image != ''"
@
click=
"
<span
v-if=
"item2.Image != ''"
@
click=
" DeleteImageUrl(item, index, item2, index2) "
DeleteImageUrl(item, index, item2, index2)
class=
"el-icon-error close"
></span>
"
class=
"el-icon-error close"
></span>
<div
v-if=
"item2.Image != ''"
style=
"position: absolute;"
>
<div
v-if=
"item2.Image != ''"
style=
"position: absolute;"
>
<div
class=
"app-attachment"
>
<div
class=
"app-attachment"
>
<el-button
@
click=
"
<el-button
@
click=
"openggImg(item, index, item2, index2)"
type=
"primary"
openggImg(item, index, item2, index2)
size=
"small"
>
替换
</el-button>
"
type=
"primary"
size=
"small"
>
替换
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -254,7 +260,8 @@
...
@@ -254,7 +260,8 @@
<
script
>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
export
default
{
export
default
{
components
:{
props
:
[
'SpecList'
,
"SpecPriceList"
],
components
:
{
ChooseImg
ChooseImg
},
},
data
()
{
data
()
{
...
@@ -278,14 +285,24 @@
...
@@ -278,14 +285,24 @@
speciList
:
[],
speciList
:
[],
DropdownList
:
[],
DropdownList
:
[],
huiyList
:
[],
huiyList
:
[],
SeparateDistributionType
:
1
,
//待传递给父组件
SeparateDistributionType
:
1
,
//待传递给父组件
EnjoyMember
:
1
,
//待传父组件
EnjoyMember
:
1
,
//待传父组件
};
};
},
},
created
()
{
created
()
{
},
watch
:
{
'SpecList'
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
SpecificationList
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
},
},
'SpecPriceList'
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
SpecificationPriceList
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
},
},
},
},
methods
:
{
methods
:
{
// 添加规格模板
// 添加规格模板
...
@@ -665,12 +682,12 @@
...
@@ -665,12 +682,12 @@
});
});
},
},
CheckBox
(
val
)
{
CheckBox
(
val
)
{
console
.
log
(
val
,
'valll'
);
console
.
log
(
val
,
'valll'
);
},
},
},
},
mounted
()
{
mounted
()
{
this
.
getSpeciList
();
this
.
getSpeciList
();
}
}
};
};
...
...
src/components/pintuan/pintuanPlugin/ladderGroup.vue
0 → 100644
View file @
8fab4aa2
<
style
>
.header-require
:before
{
content
:
'*'
;
color
:
#F56C6C
;
margin-right
:
2px
;
}
</
style
>
<
template
>
<div>
<el-form>
<el-form-item
label-width=
"0"
>
<div>
阶梯团设置
</div>
<el-table
style=
"margin-bottom: 15px;width: 100%"
v-if=
"group_list.length > 0"
:data=
"group_list"
border
>
<el-table-column
width=
"200"
>
<template
slot=
"header"
>
<div
class=
"header-require"
>
拼团人数
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.people_num"
size=
"small"
type=
"text"
maxlength=
"5"
oninput=
"this.value = this.value.replace(/[^0-9]/, '')"
placeholder=
"请输入拼团人数"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"团长优惠"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-input
type=
"text"
v-model=
"scope.row.preferential_price"
size=
"small"
placeholder=
"请输入团长优惠"
>
</el-input>
</
template
>
</el-table-column>
<el-table-column
width=
"400"
>
<
template
slot=
"header"
>
<div
class=
"header-require"
>
拼团时间
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.pintuan_time"
maxlength=
"4"
type=
"text"
size=
"small"
oninput=
"this.value = this.value.replace(/[^0-9]/, '')"
placeholder=
"请输入拼团时间"
>
<template
slot=
"append"
>
小时
</
template
>
</el-input>
</template>
</el-table-column>
<el-table-column
label=
"最多开团数量"
:render-header=
"delegation"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.group_num"
type=
"text"
size=
"small"
maxlength=
"5"
oninput=
"this.value = this.value.replace(/[^0-9]/, '')"
placeholder=
"请输入团长数量"
>
<template
slot=
"append"
>
个
</
template
>
</el-input>
</template>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"small"
@
click=
"destroyPintuan(scope.$index)"
circle
type=
"text"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../../assets/img/userman/del.png"
alt=
""
>
</el-tooltip>
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-button
type=
"text"
@
click=
"addPintuan"
>
<i
class=
"el-icon-plus"
style=
"font-weight: bolder;margin-left: 5px;"
></i>
<span
style=
"color: #353535;font-size: 14px"
>
新增阶梯团
</span>
</el-button>
</el-form-item>
<el-card
v-for=
"(item, index) in group_list"
style=
"margin-top: 24px;"
:key=
"index"
shadow=
"never"
>
<div
slot=
"header"
>
<el-tag
type=
"danger"
>
{{item.people_num}}人团
</el-tag>
</div>
<el-form-item>
<div>
价格与库存
</div>
<priceAndGroup
:attr-groups=
"new_attr_groups"
v-model=
"item.attr"
:list=
"{price: '拼团价', stock: '拼团库存'}"
></priceAndGroup>
</el-form-item>
</el-card>
</el-form>
</div>
</template>
<
script
>
import
priceAndGroup
from
"@/components/pintuan/pintuanPlugin/priceAndGroup.vue"
export
default
{
components
:
{
priceAndGroup
//拼团与库存组件
},
data
()
{
return
{
group_list
:
[],
//以下为写死-需要传入
newAttr
:
[],
defaultMemberPrice
:
[],
goods_stock
:
0
,
price
:
0
,
goods_no
:
''
,
goods_weight
:
''
,
new_attr_groups
:[]
};
},
created
()
{
},
methods
:
{
//表头提示样式
delegation
(
h
,
{
column
})
{
return
h
(
"el-popover"
,
{
props
:
{
placement
:
"top"
,
trigger
:
"hover"
,
popperClass
:
"popperClassResOut"
}
},
[
h
(
"div"
,
[
`可发起拼团的次数(包括正在拼团中、拼团完成),`
,
h
(
'br'
),
`0代表不限制次数`
,
]
),
h
(
"span"
,
{
slot
:
"reference"
},
[
column
.
label
,
h
(
"i"
,
{
class
:
"el-icon-info"
,
style
:
{
marginLeft
:
"4px"
,
cursor
:
"pointer"
,
}
})
]
),
]
)
},
//新增阶梯团
addPintuan
()
{
let
data
=
{};
if
(
this
.
newAttr
.
length
===
0
)
{
data
=
[{
attr_list
:
[{
attr_group_id
:
-
1
,
attr_group_name
:
'规格'
,
attr_name
:
this
.
attr_default_name
?
this
.
attr_default_name
:
'默认'
,
attr_id
:
-
1
,
}],
stock
:
this
.
goods_stock
,
price
:
this
.
price
,
no
:
this
.
goods_no
,
weight
:
this
.
goods_weight
,
pic_url
:
''
,
pintuan_stock
:
this
.
goods_stock
,
pintuan_price
:
this
.
price
,
goodsAttr
:
{
id
:
undefined
}
}];
}
else
{
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
newAttr
));
data
.
forEach
((
item
)
=>
{
item
.
pintuan_price
=
item
.
price
;
item
.
pintuan_stock
=
item
.
stock
;
item
.
goodsAttr
=
{
id
:
item
.
id
}
});
}
this
.
group_list
.
push
({
people_num
:
2
,
preferential_price
:
1
,
pintuan_time
:
1
,
goods_id
:
0
,
attr
:
JSON
.
parse
(
JSON
.
stringify
(
data
)),
member_price
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
defaultMemberPrice
)),
shareLevelList
:
{
share_commission_first
:
0
,
share_commission_second
:
0
,
share_commission_third
:
0
,
},
});
},
//删除拼团
destroyPintuan
(
index
)
{
this
.
group_list
.
splice
(
index
,
1
);
}
},
mounted
()
{
}
};
</
script
>
src/components/pintuan/pintuanPlugin/priceAndGroup.vue
0 → 100644
View file @
8fab4aa2
<
style
>
.app-attr
.box
{
line-height
:
64px
;
border-top
:
1px
solid
#E8EAEE
;
border-left
:
1px
solid
#E8EAEE
;
border-right
:
1px
solid
#E8EAEE
;
padding
:
0
16px
;
}
.app-attr
.box
.batch
{
margin-left
:
-10px
;
margin-right
:
20px
;
}
.app-attr
.el-select
.el-input
{
width
:
130px
;
}
.app-attr
.input-with-select
.el-input-group__prepend
{
background-color
:
#fff
;
}
.app-attr
.header-require
:before
{
content
:
'*'
;
color
:
#F56C6C
;
margin-right
:
2px
;
}
</
style
>
<
template
>
<div
class=
"app-attr"
>
<div
class=
"box"
>
<el-form
label-width=
"180px"
>
<el-checkbox
v-model=
"attrBatch"
@
change=
"selectClick"
:disabled=
"!cData || cData.length == 0"
style=
"position:absolute"
>
全选
</el-checkbox>
<el-form-item
label=
"批量设置"
size=
"small"
style=
"margin-bottom:0;padding:18px 0;display:inline-block;"
>
<el-input
@
keyup
.
enter
.
native=
"batchAttr(selectData)"
size=
"small"
:type=
"selectData == 'no' ? 'text' : 'number'"
v-model=
"batch"
>
<el-select
v-model=
"selectData"
slot=
"prepend"
>
<el-option
v-for=
"(item, index) in cList"
:value=
"index"
:key=
"item"
v-if=
"index!='pic_url'"
:label=
"item"
>
{{
item
}}
</el-option>
</el-select>
<template
slot=
"append"
>
<el-button
@
click=
"batchAttr(selectData)"
>
确定
</el-button>
</
template
>
</el-input>
</el-form-item>
</el-form>
</div>
<el-table
ref=
"multipleTable"
:data=
"cData"
border
stripe
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
v-for=
"(item, index) in attrGroups"
:key=
"item.id"
:prop=
"'attr_list['+index+'].attr_name'"
:label=
"item.attr_group_name"
>
</el-table-column>
<el-table-column
v-if=
"cList"
v-for=
"(item, key, index) in cList"
:key=
"item.id"
:property=
"key"
:label=
"item + (append ? '(' + append + ')' : '')"
>
<
template
slot=
"header"
v-if=
"requiredArray.indexOf(key) !== -1"
>
<div
class=
"header-require"
>
{{
item
}}
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"!isLevel"
>
<div
flex=
"box:first"
v-if=
"scope.column.property == 'pic_url'"
style=
"padding: 10px;"
>
<div
flex=
"cross:center"
style=
"margin-right: 10px;position: relative;"
>
<app-attachment
:multiple=
"false"
:params=
"scope.row"
:max=
"1"
v-model=
"scope.row[scope.column.property]"
>
<app-gallery
:url=
"scope.row[scope.column.property]"
width=
"50px"
height=
"50px"
></app-gallery>
</app-attachment>
<el-button
v-if=
"scope.row[scope.column.property]"
style=
"position: absolute; right: -8px; top: -8px; padding: 4px 4px;"
size=
"mini"
type=
"danger"
icon=
"el-icon-close"
circle
@
click=
"scope.row[scope.column.property] = ''"
></el-button>
</div>
</div>
<el-input
v-else-if=
"scope.column.property == 'no'"
v-model=
"scope.row[scope.column.property]"
></el-input>
<el-input
v-else-if=
"scope.column.property == 'stock'"
oninput=
"this.value = this.value.replace(/[^0-9]/g, '');"
v-model=
"scope.row[scope.column.property]"
>
</el-input>
<el-input
v-else-if=
"scope.column.property.indexOf('price') > -1 || scope.column.property.indexOf('level')"
type=
"number"
v-model=
"scope.row[scope.column.property]"
></el-input>
<el-input
v-else
oninput=
"this.value = this.value.replace(/[^0-9]/g, '');"
v-model=
"scope.row[scope.column.property]"
>
<template
v-if=
"append"
slot=
"append"
>
{{
append
}}
</
template
>
</el-input>
</template>
<
template
v-else
>
<el-input
:data-id=
"scope.row[scope.column.label]"
type=
"number"
v-model=
"scope.row[paramKey][scope.column.property]"
>
</el-input>
</
template
>
</template>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
export
default
{
props
:
{
value
:
Array
,
// 商品规格信息
attrGroups
:
Array
,
// 商品规格组
extra
:
Object
,
// 额外的数据信息
list
:
Object
|
Array
,
// 从排列数据信息
isLevel
:
Boolean
,
// 是否是会员
members
:
Array
,
// 会员等级列表
share
:
Array
,
// 分销等级列表
append
:
String
,
// 输入框后缀
requiredExtra
:
{
type
:
Array
,
default
()
{
return
[]
}
},
paramKey
:
{
type
:
String
,
default
()
{
return
'member_price'
;
}
}
},
data
()
{
return
{
requiredArray
:
[
`price`
,
`stock`
].
concat
(
this
.
requiredExtra
),
attrBatch
:
false
,
data
:
{
price
:
'价格'
,
stock
:
'库存'
,
weight
:
'重量(克)'
,
no
:
'货号'
,
//pic_url: '规格图片',
},
selectData
:
''
,
batch
:
0
,
selectList
:
[],
};
},
created
()
{
},
watch
:
{
'selectList'
:
function
()
{
const
self
=
this
;
let
sign
=
0
;
this
.
value
.
forEach
(
function
(
item
,
index
)
{
self
.
selectList
.
map
((
item1
)
=>
{
if
(
JSON
.
stringify
(
item1
.
attr_list
)
===
JSON
.
stringify
(
item
.
attr_list
))
{
sign
++
;
}
});
});
self
.
attrBatch
=
self
.
value
.
length
===
sign
;
}
},
methods
:
{
//全选
selectClick
()
{
this
.
$refs
.
multipleTable
.
toggleAllSelection
();
},
handleSelectionChange
(
data
)
{
this
.
selectList
=
data
;
},
batchAttr
(
param
)
{
if
(
!
param
)
{
this
.
$message
.
warning
(
'请选择批量设置'
);
return
;
}
if
(
!
this
.
selectList
||
this
.
selectList
.
length
===
0
)
{
this
.
$message
.
warning
(
'请勾选商品规格'
);
return
;
}
let
self
=
this
;
let
batch
=
self
.
batch
;
this
.
value
.
forEach
((
item
,
index
)
=>
{
let
sign
=
false
;
self
.
selectList
.
map
((
item1
)
=>
{
if
(
JSON
.
stringify
(
item1
.
attr_list
)
===
JSON
.
stringify
(
item
.
attr_list
))
{
sign
=
true
;
}
});
if
(
sign
)
{
// 批量设置会员价
// 判断字符串是否出现过,并返回位置
if
(
param
.
indexOf
(
'level'
)
!==
-
1
)
{
item
[
this
.
paramKey
][
param
]
=
batch
;
}
else
{
item
[
param
]
=
batch
;
}
}
});
}
},
mounted
()
{
},
computed
:
{
cList
()
{
// TODO 分销数据暂时
if
(
this
.
share
)
{
let
share
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
share
));
let
obj
=
{};
for
(
let
i
=
0
;
i
<
share
.
length
;
i
++
)
{
obj
[
share
[
i
].
value
]
=
share
[
i
].
label
;
}
return
obj
;
}
// TODO 会员数据暂时
if
(
this
.
isLevel
)
{
let
members
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
members
));
let
obj
=
{};
for
(
let
i
=
0
;
i
<
members
.
length
;
i
++
)
{
obj
[
'level'
+
members
[
i
].
level
]
=
members
[
i
].
name
}
return
obj
;
}
else
{
if
(
this
.
extra
)
{
return
Object
.
assign
(
this
.
data
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
extra
)));
}
else
if
(
this
.
list
)
{
return
JSON
.
parse
(
JSON
.
stringify
(
this
.
list
))
}
else
{
return
this
.
data
;
}
}
},
cData
()
{
if
(
this
.
attrGroups
&&
this
.
attrGroups
.
length
>
0
&&
this
.
attrGroups
[
0
].
attr_list
.
length
===
0
)
{
return
[];
}
else
{
return
this
.
value
;
}
}
},
};
</
script
>
src/components/sallCenter/plugin/goods.vue
View file @
8fab4aa2
...
@@ -542,9 +542,9 @@
...
@@ -542,9 +542,9 @@
</el-dialog>
</el-dialog>
<!-- 选择商品 -->
<!-- 选择商品 -->
<el-dialog
title=
"选择商品"
:visible
.
sync=
"isShowGoods"
custom-class=
"goodsDialog"
>
<el-dialog
title=
"选择商品"
:visible
.
sync=
"isShowGoods"
custom-class=
"goodsDialog"
>
<choiceGood
ref=
"choiceGood"
:ckGoods=
"ckGoods"
></choiceGood>
<choiceGood
ref=
"choiceGood"
></choiceGood>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"
quxiaoGoods()
"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"
isShowGoods=false
"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getGoodsChoice()"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getGoodsChoice()"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
...
...
src/components/sallCenter/pluginCenter.vue
View file @
8fab4aa2
...
@@ -92,10 +92,10 @@
...
@@ -92,10 +92,10 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
flex=
"cross:center"
style=
"margin-top:20px
;display:none
"
>
<div
flex=
"cross:center"
style=
"margin-top:20px
"
>
<h3
class=
"plugin_ListTitle"
>
营销工具
</h3>
<h3
class=
"plugin_ListTitle"
>
营销工具
</h3>
</div>
</div>
<div
flex=
"dir:left"
style=
"display:none"
class=
"plugin-list el-row"
>
<div
flex=
"dir:left"
class=
"plugin-list el-row"
>
<div
class=
"el-col el-col-24 el-col-xs-24 el-col-sm-12 el-col-md-8 el-col-lg-6 el-col-xl-4"
@
click=
"goDiyCenter('pintuanMain')"
>
<div
class=
"el-col el-col-24 el-col-xs-24 el-col-sm-12 el-col-md-8 el-col-lg-6 el-col-xl-4"
@
click=
"goDiyCenter('pintuanMain')"
>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
>
<div
style=
"padding-right: 12px;"
>
<div
style=
"padding-right: 12px;"
>
...
...
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