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
830cf40e
Commit
830cf40e
authored
Aug 17, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
89981de2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
73 deletions
+43
-73
pintuanActive.vue
src/components/pintuan/pintuanActive.vue
+9
-15
goodsSpecifica.vue
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
+34
-58
No files found.
src/components/pintuan/pintuanActive.vue
View file @
830cf40e
...
...
@@ -150,8 +150,8 @@
<i
class=
"elzk el-tooltip el-icon-info"
></i>
</el-tooltip>
</
template
>
<goodsSpe
v-show=
"IsShowSpec"
@
getSpecList=
"getSpecList"
@
getSpecPriceList=
"getSpecPriceList
"
:
SpecList=
"TempSpecList"
:SpecPriceList=
"TempSpecPriceList
"
></goodsSpe>
<goodsSpe
v-show=
"IsShowSpec"
v-if=
"addMsg.SpecificationList&&addMsg.SpecificationList.length>0
"
:
addMsg=
"addMsg
"
></goodsSpe>
</el-form-item>
<el-form-item
label=
"商品货号"
>
<el-input
v-model=
"addMsg.Goods_no"
size=
"small"
:disabled=
"true"
placeholder=
"请输入商品货号"
...
...
@@ -392,7 +392,7 @@
</el-card>
</el-tab-pane>
<el-tab-pane
label=
"阶梯团设置"
>
<groupStep
v-if=
"TempSpecList&&TempSpecList.length>0"
:SpecList=
"TempSpecList"
<groupStep
v-if=
"TempSpecList&&TempSpecList.length>0"
:
addMsg=
"addMsg"
:
SpecList=
"TempSpecList"
:SpecPriceList=
"TempSpecPriceList"
:GroupPriceList=
"TempGroupPriceList"
@
setNewVal=
"setNewVal"
>
</groupStep>
</el-tab-pane>
...
...
@@ -629,7 +629,7 @@
if
(
Mydata
.
SpecificationList
&&
Mydata
.
SpecificationList
.
length
>
0
)
{
this
.
addMsg
.
SpecificationList
=
Mydata
.
SpecificationList
;
//规格赋值
this
.
TempSpecList
=
Mydata
.
SpecificationList
;
//
this.TempSpecList = Mydata.SpecificationList;
}
if
(
Mydata
.
SpecificationPriceList
&&
Mydata
.
SpecificationPriceList
.
length
>
0
)
{
this
.
addMsg
.
SpecificationPriceList
=
Mydata
.
SpecificationPriceList
;
//规格列表赋值
...
...
@@ -717,14 +717,16 @@
}
})
}
this
.
TempSpecList
=
JSON
.
parse
(
JSON
.
stringify
(
tempSpecArray
));
this
.
addMsg
.
SpecificationList
=
JSON
.
parse
(
JSON
.
stringify
(
tempSpecArray
));
var
tempPriceArray
=
chooseGoods
[
0
].
SpecificationPriceList
;
if
(
tempPriceArray
&&
tempPriceArray
.
length
>
0
)
{
tempPriceArray
.
forEach
(
item
=>
{
item
.
Id
=
0
;
});
}
this
.
TempSpecPriceList
=
JSON
.
parse
(
JSON
.
stringify
(
tempPriceArray
));
this
.
addMsg
.
SpecificationPriceList
=
tempPriceArray
this
.
IsShowSpec
=
true
;
}
this
.
$refs
.
choiceGood
.
toggleSelection
();
...
...
@@ -799,14 +801,6 @@
this
.
TempGroupPriceList
=
tempObj
;
this
.
addMsg
.
GroupList
=
tempObj
;
},
//获取子组件规格
getSpecList
(
val
)
{
this
.
addMsg
.
SpecificationList
=
val
;
},
//获取子组件规格价格列表
getSpecPriceList
(
val
)
{
this
.
addMsg
.
SpecificationPriceList
=
val
;
},
//获取分销金额
getDisCommission
(
disCommissionArray
)
{
if
(
this
.
addMsg
.
GroupList
&&
this
.
addMsg
.
GroupList
.
length
>
0
)
{
...
...
@@ -829,7 +823,7 @@
},
//获取会员价列表
getMemberList
(
memberList
)
{
console
.
log
(
"memberList"
,
memberList
);
console
.
log
(
"memberList"
,
memberList
);
if
(
this
.
addMsg
.
GroupList
&&
this
.
addMsg
.
GroupList
.
length
>
0
)
{
this
.
addMsg
.
GroupList
.
forEach
(
item
=>
{
if
(
memberList
&&
memberList
.
length
>
0
)
{
...
...
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
View file @
830cf40e
...
...
@@ -104,7 +104,7 @@
<div>
<div
style=
"width:130%"
class=
"goodsSpecifica"
>
<div
class=
"app-attr-group"
>
<div
v-for=
"(item, index) in SpecificationList"
:key=
"index+'3'"
style=
"margin-bottom:16px;"
>
<div
v-for=
"(item, index) in
addMsg.
SpecificationList"
:key=
"index+'3'"
style=
"margin-bottom:16px;"
>
<div
flex=
"dir:left cross:center"
class=
"bg"
>
<span>
规格名:
</span>
<el-input
@
input=
"ggzChange(false)"
v-model=
"item.Name"
size=
"mini"
style=
"width: 94px;margin: 0px 16px;"
>
...
...
@@ -149,14 +149,16 @@
</div>
</div>
</div>
<div
v-if=
"SpecificationList.length
<
6
"
flex=
"dir:left cross:center"
class=
"bg"
>
<div
v-if=
"!addMsg.SpecificationList||(addMsg.SpecificationList&&addMsg.SpecificationList.length
<
6
)"
flex=
"dir:left cross:center"
class=
"bg"
>
<el-button
@
click=
"chooseSpec"
size=
"small"
>
选择规格模板
</el-button>
<el-button
@
click=
"addSpec"
size=
"small"
>
添加规格项目
</el-button>
<span
style=
"padding-left: 14px;color: rgb(201, 201, 201)"
>
注:规格名最多添加5个
</span>
</div>
</div>
</div>
<div
v-show=
"SpecificationPriceList.length > 0"
style=
"width: 130%; margin-top: 24px;"
>
<div
v-show=
"addMsg.SpecificationPriceList&&addMsg.SpecificationPriceList.length > 0"
style=
"width: 130%; margin-top: 24px;"
>
<div
class=
"app-attr"
>
<div
class=
"box"
>
<el-form-item
label-width=
"90px"
style=
"display:inline-block"
label=
"批量设置"
>
...
...
@@ -173,11 +175,11 @@
</el-input>
</el-form-item>
</div>
<el-table
ref=
"table"
:data=
"SpecificationPriceList"
border
style=
"width: 100%"
<el-table
ref=
"table"
:data=
"
addMsg.
SpecificationPriceList"
border
style=
"width: 100%"
@
selection-change=
"TbaleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<template
v-for=
"(item, index) in SpecificationList"
>
<template
v-for=
"(item, index) in
addMsg.
SpecificationList"
>
<el-table-column
:key=
"index+'5'"
:label=
"item.Name"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"index == index2"
v-for=
"(item2, index2) in scope.row.AttrList"
:key=
"index2+'6'"
>
...
...
@@ -252,19 +254,16 @@
<ChooseImg
@
SelectId=
"SelectId"
:IsMultiple=
"true"
></ChooseImg>
</el-dialog>
</div>
</template>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
export
default
{
props
:
[
'SpecList'
,
"SpecPriceList
"
],
props
:
[
"addMsg
"
],
components
:
{
ChooseImg
},
data
()
{
return
{
SpecificationList
:
[],
//规格数组
SpecificationPriceList
:
[],
//规格+值 价格列表
ComTreeList
:
[],
memberList2
:
[],
skuList
:
[],
...
...
@@ -285,31 +284,6 @@
SeparateDistributionType
:
1
,
//待传递给父组件
EnjoyMember
:
1
,
//待传父组件
};
},
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
));
},
},
'SpecificationList'
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
$emit
(
'getSpecList'
,
this
.
SpecificationList
);
},
},
'SpecificationPriceList'
:
{
handler
:
function
(
val
,
oldval
)
{
this
.
$emit
(
'getSpecPriceList'
,
this
.
SpecificationPriceList
);
},
}
},
created
()
{
},
methods
:
{
// 添加规格模板
...
...
@@ -318,18 +292,19 @@
let
obj
=
{
Name
:
""
,
SpecificationValueList
:
[],
Sort
:
that
.
SpecificationList
.
length
+
1
,
Sort
:
that
.
addMsg
.
SpecificationList
.
length
+
1
,
Id
:
0
,
EnabledImage
:
2
};
this
.
SpecificationList
.
push
(
obj
);
this
.
addMsg
.
SpecificationList
.
push
(
obj
);
this
.
ggzChange
(
true
);
},
// 修改规格值
ggzChange
(
isReload
)
{
this
.
$forceUpdate
();
if
(
isReload
)
{
this
.
skuList
=
[];
this
.
getSkuData
([],
0
,
this
.
SpecificationList
);
this
.
getSkuData
([],
0
,
this
.
addMsg
.
SpecificationList
);
}
},
getSkuData
(
skuArr
=
[],
i
,
list
)
{
...
...
@@ -352,11 +327,11 @@
}
}
testyunx
(
skuArr
,
i
,
list
)
this
.
calcList
(
this
.
skuList
,
this
.
SpecificationList
);
this
.
calcList
(
this
.
skuList
,
this
.
addMsg
.
SpecificationList
);
},
calcList
(
tempSkuList
,
calist
)
{
let
oldArr
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
SpecificationPriceList
))
this
.
SpecificationPriceList
=
[];
let
oldArr
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addMsg
.
SpecificationPriceList
))
this
.
addMsg
.
SpecificationPriceList
=
[];
var
tempArray
=
[];
tempSkuList
.
forEach
(
item
=>
{
var
tempObj
=
{
...
...
@@ -398,7 +373,7 @@
item
.
Commission
=
val
.
Commission
;
}
})
this
.
SpecificationPriceList
.
push
(
item
);
this
.
addMsg
.
SpecificationPriceList
.
push
(
item
);
});
this
.
$forceUpdate
();
},
...
...
@@ -411,13 +386,13 @@
}
that
.
ComTreeList
=
[];
that
.
memberList2
=
[];
that
.
SpecificationList
.
splice
(
index
,
1
);
if
(
that
.
SpecificationList
.
length
==
0
)
{
that
.
addMsg
.
SpecificationList
.
splice
(
index
,
1
);
if
(
that
.
addMsg
.
SpecificationList
.
length
==
0
)
{
that
.
SeparateDistributionType
=
1
;
}
that
.
$forceUpdate
();
that
.
skuList
=
[];
that
.
getSkuData
([],
0
,
that
.
SpecificationList
);
that
.
getSkuData
([],
0
,
that
.
addMsg
.
SpecificationList
);
});
},
//删除规格值
...
...
@@ -427,13 +402,13 @@
if
(
item
.
Id
>
0
)
{
that
.
getDeleteSpecValue
(
item
.
Id
);
}
that
.
SpecificationList
[
index
].
SpecificationValueList
.
splice
(
index2
,
1
);
that
.
addMsg
.
SpecificationList
[
index
].
SpecificationValueList
.
splice
(
index2
,
1
);
that
.
$forceUpdate
();
if
(
that
.
SpecificationList
[
index
].
SpecificationValueList
.
length
==
0
)
{
that
.
SpecificationList
.
splice
(
index
,
1
);
if
(
that
.
addMsg
.
SpecificationList
[
index
].
SpecificationValueList
.
length
==
0
)
{
that
.
addMsg
.
SpecificationList
.
splice
(
index
,
1
);
}
that
.
skuList
=
[];
that
.
getSkuData
([],
0
,
that
.
SpecificationList
);
that
.
getSkuData
([],
0
,
that
.
addMsg
.
SpecificationList
);
});
},
openggImg
(
item
,
index
,
item2
,
index2
)
{
...
...
@@ -443,7 +418,7 @@
this
.
imgListIndex2
=
index2
;
},
DeleteImageUrl
(
item
,
index
,
item2
,
index2
)
{
this
.
SpecificationList
[
index
].
SpecificationValueList
[
index2
].
Image
=
""
;
this
.
addMsg
.
SpecificationList
[
index
].
SpecificationValueList
[
index2
].
Image
=
""
;
},
// 添加规格值
AddSpecValue
(
item
,
index
)
{
...
...
@@ -453,7 +428,8 @@
Name
:
""
,
Sort
:
item
.
SpecificationValueList
.
length
+
1
};
this
.
SpecificationList
[
index
].
SpecificationValueList
.
push
(
obj
);
this
.
addMsg
.
SpecificationList
[
index
].
SpecificationValueList
.
push
(
obj
);
this
.
ggzChange
(
true
);
},
//添加规格
chooseSpec
()
{
...
...
@@ -486,8 +462,8 @@
},
//选择规格
chooseSpecificationValueList
()
{
if
(
!
this
.
SpecificationList
)
{
this
.
SpecificationList
=
[];
if
(
!
this
.
addMsg
.
SpecificationList
)
{
this
.
addMsg
.
SpecificationList
=
[];
}
let
arr
=
[];
this
.
speciList
.
forEach
(
item
=>
{
...
...
@@ -495,10 +471,10 @@
arr
.
push
(
item
);
}
});
this
.
SpecificationList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
SpecificationList
.
concat
(
arr
))
this
.
addMsg
.
SpecificationList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addMsg
.
SpecificationList
.
concat
(
arr
))
);
this
.
SpecificationList
.
forEach
((
item
,
index
)
=>
{
this
.
addMsg
.
SpecificationList
.
forEach
((
item
,
index
)
=>
{
item
.
EnabledImage
=
2
;
item
.
Sort
=
index
;
item
.
SpecificationValueList
.
forEach
((
list
,
index2
)
=>
{
...
...
@@ -509,7 +485,7 @@
this
.
ComTreeList
=
[];
this
.
memberList2
=
[]
this
.
skuList
=
[];
this
.
getSkuData
([],
0
,
this
.
SpecificationList
);
this
.
getSkuData
([],
0
,
this
.
addMsg
.
SpecificationList
);
this
.
speciDig
=
false
;
},
ggPlSet
()
{
...
...
@@ -517,7 +493,7 @@
this
.
Error
(
"至少选择一项!"
);
return
;
}
this
.
SpecificationPriceList
.
forEach
(
item
=>
{
this
.
addMsg
.
SpecificationPriceList
.
forEach
(
item
=>
{
this
.
ggplList
.
forEach
(
list
=>
{
if
(
item
.
Id
==
list
.
Id
)
{
if
(
this
.
ggpl
==
1
)
{
...
...
@@ -561,7 +537,7 @@
if
(
this
.
imgType
==
3
)
{
let
imgListIndex1
=
this
.
imgListIndex1
;
let
imgListIndex2
=
this
.
imgListIndex2
;
this
.
SpecificationList
[
imgListIndex1
].
SpecificationValueList
[
this
.
addMsg
.
SpecificationList
[
imgListIndex1
].
SpecificationValueList
[
imgListIndex2
].
Image
=
that
.
getIconLink
(
msg
[
0
].
url
);
}
...
...
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