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
241fff1c
Commit
241fff1c
authored
Sep 02, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品详情修改
parent
d5e7972d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
201 deletions
+28
-201
goodsListEdit.vue
src/components/CommodityMan/goodsListEdit.vue
+13
-4
addSite.vue
src/components/director/addSite.vue
+15
-197
No files found.
src/components/CommodityMan/goodsListEdit.vue
View file @
241fff1c
...
...
@@ -1526,7 +1526,7 @@
let
obj
=
{
Name
:
""
,
SpecificationValueList
:
[],
Sort
:
that
.
SpecificationList
.
length
+
1
,
Sort
:
that
.
SpecificationList
.
length
>
0
?
that
.
SpecificationList
[
that
.
SpecificationList
.
length
-
1
].
Sort
+
1
:
that
.
SpecificationList
.
length
+
1
,
Id
:
0
,
EnabledImage
:
2
};
...
...
@@ -1538,7 +1538,8 @@
Id
:
0
,
Image
:
""
,
Name
:
""
,
Sort
:
item
.
SpecificationValueList
.
length
+
1
// Sort: item.SpecificationValueList.length + 1
Sort
:
item
.
SpecificationValueList
.
length
>
0
?
item
.
SpecificationValueList
[
item
.
SpecificationValueList
.
length
-
1
].
Sort
+
1
:
item
.
SpecificationValueList
.
length
+
1
};
this
.
SpecificationList
[
index
].
SpecificationValueList
.
push
(
obj
);
},
...
...
@@ -2145,8 +2146,8 @@
if
(
this
.
addMsg
.
PresentFXGrade
==
0
)
{
this
.
addMsg
.
PresentFXGrade
=
''
}
if
(
!
this
.
addMsg
.
MarketingLogo
||
this
.
addMsg
.
MarketingLogo
==
null
)
{
if
(
!
this
.
addMsg
.
MarketingLogo
||
this
.
addMsg
.
MarketingLogo
==
null
)
{
this
.
addMsg
.
MarketingLogo
=
{
iswords
:
0
,
words
:
""
,
...
...
@@ -2154,7 +2155,15 @@
wordsBack
:
""
,
ico
:
""
}
}
else
{
}
else
if
(
this
.
addMsg
.
MarketingLogo
.
indexOf
(
'iswords'
)
==-
1
){
this
.
addMsg
.
MarketingLogo
=
{
iswords
:
0
,
words
:
""
,
wordsColor
:
""
,
wordsBack
:
""
,
ico
:
""
}
}
else
{
let
MarketingLogo
=
JSON
.
parse
(
this
.
addMsg
.
MarketingLogo
)
let
obj
=
MarketingLogo
this
.
addMsg
.
MarketingLogo
=
obj
...
...
src/components/director/addSite.vue
View file @
241fff1c
...
...
@@ -6,8 +6,8 @@
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:60%"
>
<el-form-item
label=
"站点名称"
prop=
"Name"
class=
"is-required"
>
<el-input
v-model=
"addMsg.SiteName"
placeholder=
"请输入
包邮
名称"
/>
<el-form-item
label=
"站点名称"
prop=
"
Site
Name"
class=
"is-required"
>
<el-input
v-model=
"addMsg.SiteName"
placeholder=
"请输入
站点
名称"
/>
</el-form-item>
...
...
@@ -21,125 +21,34 @@
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<el-row>
<el-col
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
一级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{
item
.
Name
}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{
item
.
Name
}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild2(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
二级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{
item
.
Name
}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{
item
.
Name
}}
</span>
<i
v-if=
"item.ChildList.length>0"
@
click=
"getChild3(item.ChildList)"
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<h3
style=
"padding:15px 0"
>
三级分类
</h3>
<div
class=
"app-goods-cat-list active"
>
<el-checkbox-group
v-model=
"NewCategoryList"
@
change=
"handleCheckChange"
>
<div
v-for=
"(item,index) in childList3"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item.Id"
>
<span
style=
"display: none;"
>
{{
item
.
Name
}}
</span>
</el-checkbox>
<div
flex=
"box:last cross:center"
>
<span>
{{
item
.
Name
}}
</span>
<i
class=
"el-icon-arrow-right"
></i>
</div>
</div>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<div
class=
"tag-box"
>
<el-tag
@
close=
"exitCheck(item)"
v-for=
"(item,index) in addMsg.CategoryList"
:key=
"index"
type=
"warning"
closable
style=
"margin-right:5px"
>
{{
item
.
Name
}}
</el-tag>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()"
>
取 消
</el-button>
<el-button
@
click=
"flDig = false"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
checkAll
:
false
,
checkedCities
:
[],
cities
:
[],
cityOptions
:
[],
isIndeterminate
:
true
,
flDig
:
false
,
rulesType
:
1
,
addMsg
:
{
Id
:
0
,
FullNumPinkage
:
0
,
FullMoneyPinkage
:
0
,
IsEnable
:
0
,
Name
:
''
,
CategoryList
:
[],
FreeShippingUrl
:
''
,
ID
:
0
,
SiteName
:
''
,
RegionList
:[],
IsEnable
:
0
},
rules
:
{
FullNumPinkage
:
[{
required
:
true
,
message
:
'请输入件数'
,
trigger
:
'blur'
}],
Name
:
[{
SiteName
:
[{
required
:
true
,
message
:
'请输入
包邮
名称'
,
message
:
'请输入
站点
名称'
,
trigger
:
'blur'
}],
FullMoneyPinkage
:
[{
required
:
true
,
message
:
'请选择额度'
,
trigger
:
'change'
}],
IsEnable
:
[{
required
:
true
,
message
:
'请选择是否启用'
,
trigger
:
'change'
}],
},
loading
:
false
,
fenleiData
:[],
childList2
:
[],
childList3
:
[],
keepCategoryList
:
[],
NewCategoryList
:
[],
};
},
created
()
{
this
.
getTree
();
if
(
this
.
$route
.
query
.
ID
){
this
.
getData
(
this
.
$route
.
query
.
ID
)
}
...
...
@@ -151,23 +60,6 @@
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
addMsg
.
CategoryList
.
length
==
0
)
{
this
.
Error
(
"请选择分类!"
);
return
;
}
if
(
this
.
addMsg
.
FullNumPinkage
==
0
&&
this
.
addMsg
.
FullMoneyPinkage
==
0
){
this
.
Error
(
"包邮件数和满额额度至少一个大于0"
);
return
;
}
let
List
=
[]
this
.
addMsg
.
CategoryList
.
forEach
(
x
=>
{
let
obj
=
{}
obj
.
CategoryId
=
x
.
CategoryId
;
obj
.
CategoryName
=
x
.
CategoryName
;
List
.
push
(
obj
)
})
this
.
addMsg
.
CategoryList
=
List
this
.
apipost
(
"/api/MallBase/AddOrUpdateFreeShipping"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CommonJump
(
'mailRules'
);
...
...
@@ -181,75 +73,9 @@
}
});
},
ExitCateList
()
{
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
})
},
handleCheckChange
()
{
this
.
addMsg
.
CategoryList
=
[];
this
.
NewCategoryList
.
forEach
(
list
=>
{
this
.
fenleiData
.
forEach
(
item
=>
{
if
(
list
==
item
.
Id
)
{
item
.
CategoryId
=
item
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item
)
}
item
.
ChildList
.
forEach
(
item2
=>
{
if
(
list
==
item2
.
Id
)
{
item2
.
CategoryId
=
item2
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item2
)
}
item2
.
ChildList
.
forEach
(
item3
=>
{
if
(
list
==
item3
.
Id
)
{
item3
.
CategoryId
=
item3
.
Id
;
this
.
addMsg
.
CategoryList
.
push
(
item3
)
}
})
})
})
})
},
exitCheck
(
item
,
index
)
{
this
.
addMsg
.
CategoryList
.
forEach
((
list
,
k
)
=>
{
if
(
list
.
Id
==
item
.
Id
)
{
this
.
addMsg
.
CategoryList
.
splice
(
k
,
1
);
}
})
this
.
ExitCateList
();
},
getChild3
(
ChildList
)
{
this
.
childList3
=
ChildList
;
},
getChild2
(
ChildList
)
{
this
.
childList2
=
ChildList
;
},
getTree
()
{
let
msg1
=
{
Id
:
0
,
Name
:
''
,
Tier
:
0
,
ParentId
:
0
,
Enabled
:
1
,
IsShow
:
1
,
}
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
this
.
fenleiData
.
forEach
(
item
=>
{
item
.
CategoryName
=
item
.
Name
;
item
.
ChildList
.
forEach
(
item2
=>
{
item2
.
CategoryName
=
item2
.
Name
;
item2
.
ChildList
.
forEach
(
item3
=>
{
item3
.
CategoryName
=
item3
.
Name
;
})
})
})
}
})
},
getData
(
ID
)
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/MallBase/GetFreeShippingModel"
,
{
...
...
@@ -257,15 +83,7 @@
},
res
=>
{
this
.
loading
=
false
;
this
.
addMsg
=
res
.
data
.
data
;
if
(
this
.
addMsg
.
FullMoneyPinkage
!=
0
&&
this
.
addMsg
.
FullNumPinkage
==
0
){
this
.
rulesType
=
2
}
this
.
NewCategoryList
=
[];
this
.
addMsg
.
CategoryList
.
forEach
(
item
=>
{
item
.
Name
=
item
.
CategoryName
;
this
.
NewCategoryList
.
push
(
item
.
CategoryId
)
})
this
.
checkedCities
=
[];
})
},
...
...
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