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
8fd15647
Commit
8fd15647
authored
Aug 12, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9809a98a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
90 deletions
+17
-90
goodsSpecifica.vue
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
+17
-90
No files found.
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
View file @
8fd15647
...
...
@@ -125,7 +125,7 @@
<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
class=
"attr-jt"
></div>
<div
v-if=
"item2.Image == ''"
@
click=
"
openggImg(item, index, item2, index2)
"
<div
v-if=
"item2.Image == ''"
@
click=
"
openggImg(item, index, item2, index2)
"
class=
"app-attachment"
>
<div
style=
"line-height: normal; display: inline-block;"
>
<span>
+添加图片
</span>
...
...
@@ -134,7 +134,7 @@
<div
v-if=
"item2.Image != ''"
class=
"el-image"
style=
"height: 88px; width: 88px;"
>
<img
:src=
"item2.Image"
style=
"width:100%;height:100%"
/>
</div>
<span
v-if=
"item2.Image != ''"
@
click=
"
DeleteImageUrl(item, index, item2, index2)
"
<span
v-if=
"item2.Image != ''"
@
click=
"
DeleteImageUrl(item, index, item2, index2)
"
class=
"el-icon-error close"
></span>
<div
v-if=
"item2.Image != ''"
style=
"position: absolute;"
>
<div
class=
"app-attachment"
>
...
...
@@ -145,14 +145,14 @@
</div>
</div>
<div>
<span
@
click=
"
addGgz
(item, index)"
class=
"blue f12"
>
添加规格值
</span>
<span
@
click=
"
AddSpecValue
(item, index)"
class=
"blue f12"
>
添加规格值
</span>
</div>
</div>
</div>
</div>
<div
v-if=
"SpecificationList.length
<
6
"
flex=
"dir:left cross:center"
class=
"bg"
>
<el-button
@
click=
"
addggModeule"
size=
"small"
>
添加
规格模板
</el-button>
<el-button
@
click=
"add
ggxm
"
size=
"small"
>
添加规格项目
</el-button>
<el-button
@
click=
"
chooseSpec"
size=
"small"
>
选择
规格模板
</el-button>
<el-button
@
click=
"add
Spec
"
size=
"small"
>
添加规格项目
</el-button>
<span
style=
"padding-left: 14px;color: rgb(201, 201, 201)"
>
注:规格名最多添加5个
</span>
</div>
</div>
...
...
@@ -160,7 +160,6 @@
<div
v-show=
"SpecificationPriceList.length > 0"
style=
"width: 130%; margin-top: 24px;"
>
<div
class=
"app-attr"
>
<div
class=
"box"
>
<!--
<el-checkbox
v-model=
"val2"
>
全选
</el-checkbox>
-->
<el-form-item
label-width=
"90px"
style=
"display:inline-block"
label=
"批量设置"
>
<el-input
style=
"width:100%"
size=
"small"
v-model=
"valpl"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-select
style=
"width:120px"
v-model=
"ggpl"
slot=
"prepend"
placeholder=
"请选择"
>
...
...
@@ -253,7 +252,6 @@
<el-dialog
title=
"选择文件"
:visible
.
sync=
"changeState"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
:IsMultiple=
"true"
></ChooseImg>
</el-dialog>
</div>
</template>
...
...
@@ -316,7 +314,7 @@
},
methods
:
{
// 添加规格模板
add
ggxm
()
{
add
Spec
()
{
let
that
=
this
;
let
obj
=
{
Name
:
""
,
...
...
@@ -330,8 +328,7 @@
// 修改规格值
ggzChange
()
{
this
.
$forceUpdate
();
this
.
ComTreeList
=
[];
this
.
memberList2
=
[];
this
.
skuList
=
[];
this
.
getSkuData
([],
0
,
this
.
SpecificationList
);
},
...
...
@@ -355,6 +352,7 @@
}
}
testyunx
(
skuArr
,
i
,
list
)
console
.
log
(
"this.skuList"
,
this
.
skuList
);
this
.
calcList
(
this
.
skuList
,
this
.
SpecificationList
);
},
calcList
(
list
,
calist
)
{
...
...
@@ -421,82 +419,8 @@
};
arrList
.
push
(
obj1
);
});
this
.
calcdis
(
JSON
.
parse
(
JSON
.
stringify
(
arrList
)));
},
calcdis
(
dislist
)
{
let
memberListarray
=
JSON
.
parse
(
JSON
.
stringify
(
dislist
));
let
ComTreeList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
ComTreeList
));
for
(
let
i
=
0
;
i
<
dislist
.
length
;
i
++
)
{
if
(
this
.
SeparateDistributionType
==
2
&&
this
.
ComTreeList
.
length
>
0
)
{
if
(
i
<
ComTreeList
.
length
)
{
ComTreeList
.
forEach
((
val
,
z
)
=>
{
if
(
val
.
SpecificationSort
==
dislist
[
i
].
SpecificationSort
)
{
dislist
[
i
].
GradeCommissionList
=
[];
dislist
[
i
].
GradeCommissionList
=
val
.
GradeCommissionList
;
}
})
}
else
{
for
(
let
j
=
0
;
j
<
this
.
DropdownList
.
length
;
j
++
)
{
let
obj
=
{
SpecificationSort
:
dislist
[
i
].
SpecificationSort
,
DistributorGrade
:
this
.
DropdownList
[
j
].
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
,
Name
:
dislist
[
i
].
Name
};
dislist
[
i
].
GradeCommissionList
.
push
(
obj
);
}
}
}
else
{
for
(
let
j
=
0
;
j
<
this
.
DropdownList
.
length
;
j
++
)
{
let
obj
=
{
SpecificationSort
:
dislist
[
i
].
SpecificationSort
,
DistributorGrade
:
this
.
DropdownList
[
j
].
Id
,
OneCommission
:
0
,
TwoCommission
:
0
,
ThreeCommission
:
0
,
Name
:
dislist
[
i
].
Name
};
dislist
[
i
].
GradeCommissionList
.
push
(
obj
);
}
}
}
for
(
let
i
=
0
;
i
<
memberListarray
.
length
;
i
++
)
{
memberListarray
[
i
].
GradePriceList
=
[];
if
(
this
.
EnjoyMember
==
1
&&
this
.
memberList2
.
length
>
0
)
{
if
(
i
<
this
.
memberList2
.
length
)
{
this
.
memberList2
.
forEach
(
val
=>
{
if
(
val
.
SpecificationSort
==
memberListarray
[
i
].
SpecificationSort
)
{
memberListarray
[
i
].
GradePriceList
=
[];
memberListarray
[
i
].
GradePriceList
=
val
.
GradePriceList
;
}
})
}
else
{
for
(
let
j
=
0
;
j
<
this
.
huiyList
.
length
;
j
++
)
{
let
obj
=
{
MemberGrade
:
this
.
huiyList
[
j
].
Grade
,
MemberPrice
:
0
};
memberListarray
[
i
].
GradePriceList
.
push
(
obj
);
}
}
}
else
{
for
(
let
j
=
0
;
j
<
this
.
huiyList
.
length
;
j
++
)
{
let
obj
=
{
MemberGrade
:
this
.
huiyList
[
j
].
Grade
,
MemberPrice
:
0
};
memberListarray
[
i
].
GradePriceList
.
push
(
obj
);
}
}
}
this
.
disList2
=
JSON
.
parse
(
JSON
.
stringify
(
dislist
));
this
.
memberList2
=
JSON
.
parse
(
JSON
.
stringify
(
memberListarray
));
},
//
删除规格模板
//删除规格模板
DeleteggModule
(
item
,
index
)
{
this
.
ComTreeList
=
[];
this
.
memberList2
=
[];
...
...
@@ -508,7 +432,7 @@
this
.
skuList
=
[];
this
.
getSkuData
([],
0
,
this
.
SpecificationList
);
},
//
删除规格值
//删除规格值
Deleteggz
(
item
,
index
,
index2
)
{
this
.
SpecificationList
[
index
].
SpecificationValueList
.
splice
(
index2
,
1
);
this
.
$forceUpdate
();
...
...
@@ -528,7 +452,7 @@
this
.
SpecificationList
[
index
].
SpecificationValueList
[
index2
].
Image
=
""
;
},
// 添加规格值
addGgz
(
item
,
index
)
{
AddSpecValue
(
item
,
index
)
{
let
obj
=
{
Id
:
0
,
Image
:
""
,
...
...
@@ -537,7 +461,8 @@
};
this
.
SpecificationList
[
index
].
SpecificationValueList
.
push
(
obj
);
},
addggModeule
()
{
//添加规格
chooseSpec
()
{
this
.
speciDig
=
true
;
this
.
speciList
.
forEach
(
item
=>
{
item
.
NewSpecList
=
[];
...
...
@@ -561,9 +486,11 @@
}
this
.
$forceUpdate
();
},
//规格值切换选择
changeSpeciList
(
val
,
index
)
{
this
.
$forceUpdate
();
},
//选择规格
chooseSpecificationValueList
()
{
if
(
!
this
.
SpecificationList
)
{
this
.
SpecificationList
=
[];
...
...
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