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
4f77f011
Commit
4f77f011
authored
May 08, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0938ab3f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
515 additions
and
55 deletions
+515
-55
common.css
src/assets/css/common.css
+3
-0
goodsList.vue
src/components/CommodityMan/goodsList.vue
+499
-50
goodsServices.vue
src/components/CommodityMan/goodsServices.vue
+1
-1
goodsServicesEdit.vue
src/components/CommodityMan/goodsServicesEdit.vue
+6
-2
index.js
src/router/index.js
+6
-2
No files found.
src/assets/css/common.css
View file @
4f77f011
...
@@ -88,6 +88,9 @@
...
@@ -88,6 +88,9 @@
.cred
{
.cred
{
color
:
rgb
(
245
,
108
,
108
);
color
:
rgb
(
245
,
108
,
108
);
}
}
.c99
{
color
:
#999999
;
}
.el-form-item
{
.el-form-item
{
position
:
relative
;
position
:
relative
;
}
}
...
...
src/components/CommodityMan/goodsList.vue
View file @
4f77f011
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"head-title"
>
<div
class=
"head-title"
>
商品列表
商品列表
<el-button
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
商品导出
</el-button>
<el-button
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
商品导出
</el-button>
<el-button
@
click=
"CommonJump('goods
Services
Edit')"
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
添加商品
</el-button>
<el-button
@
click=
"CommonJump('goods
List
Edit')"
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
添加商品
</el-button>
<el-button
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
更新所有商品销量
</el-button>
<el-button
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
更新所有商品销量
</el-button>
</div>
</div>
...
@@ -11,20 +11,22 @@
...
@@ -11,20 +11,22 @@
<div>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
:dataId=
"0"
label=
"全部"
name=
"first"
></el-tab-pane>
<el-tab-pane
:dataId=
"0"
label=
"全部"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"上架中"
name=
"second"
></el-tab-pane>
<el-tab-pane
:dataId=
"1"
label=
"上架中"
name=
"second"
></el-tab-pane>
<el-tab-pane
label=
"下架中"
name=
"third"
></el-tab-pane>
<el-tab-pane
:dataId=
"2"
label=
"下架中"
name=
"third"
></el-tab-pane>
<el-tab-pane
label=
"售罄"
name=
"fourth"
></el-tab-pane>
<el-tab-pane
:dataId=
"3"
label=
"售罄"
name=
"fourth"
></el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
<div>
<div>
<el-button
style=
"margin-right:20px;"
size=
"small"
>
分类筛选
</el-button>
<el-button
@
click=
"flDig=true"
style=
"margin-right:10px;"
size=
"small"
>
分类筛选
</el-button>
<el-button
v-show=
"checkList.length>0"
@
click=
"checkList=[],msg.CategoryIds='',getList()"
type=
"danger"
style=
"margin-right:10px;"
size=
"small"
>
清除分类
</el-button>
<span>
添加时间:
</span>
<span>
添加时间:
</span>
<el-date-picker
<el-date-picker
v-model=
"
msg.val
"
v-model=
"
dateList
"
@
change=
"getList"
@
change=
"getList"
size=
"small"
size=
"small"
type=
"datetimerange"
type=
"datetimerange"
range-separator=
"至"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-date-picker>
...
@@ -38,19 +40,20 @@
...
@@ -38,19 +40,20 @@
</el-input>
</el-input>
<span
@
click=
"getList"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
<span
@
click=
"getList"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<span
class=
'blue point'
>
清空筛选条件
</span>
<span
@
click=
"Clearconditions"
v-if=
"msg.Name!='' || msg.CategoryIds!='' || (dateList && dateList.length>0)"
class=
'blue point'
>
清空筛选条件
</span>
</div>
</div>
<div
style=
"margin-top:15px"
>
<div
style=
"margin-top:15px"
>
<el-button
style=
"margin-left:10px;"
size=
"mini"
>
上架
</el-button>
<el-button
@
click=
"tableSet(4)"
style=
"margin-left:10px;"
size=
"mini"
>
上架
</el-button>
<el-button
style=
"margin-left:10px;"
size=
"mini"
>
下架
</el-button>
<el-button
@
click=
"tableSet(5)"
style=
"margin-left:10px;"
size=
"mini"
>
下架
</el-button>
<el-button
style=
"margin-left:10px;"
size=
"mini"
>
删除
</el-button>
<el-button
@
click=
"tableSet(6)"
style=
"margin-left:10px;"
size=
"mini"
>
删除
</el-button>
<el-button
style=
"margin-left:10px;"
size=
"mini"
>
批量设置
</el-button>
<el-button
@
click=
"plsetBtn"
style=
"margin-left:10px;"
size=
"mini"
>
批量设置
</el-button>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
v-loading=
"loading"
v-loading=
"loading"
border
border
@
selection-change=
"tableSelect"
style=
"width: 100%;margin:20px 0"
>
style=
"width: 100%;margin:20px 0"
>
<el-table-column
<el-table-column
type=
"selection"
type=
"selection"
...
@@ -72,9 +75,9 @@
...
@@ -72,9 +75,9 @@
<img
@
click=
"scope.row.editsort=true,scope.row.SortNew=scope.row.Sort"
style=
"width:15px;height:15px;margin-left:7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
>
<img
@
click=
"scope.row.editsort=true,scope.row.SortNew=scope.row.Sort"
style=
"width:15px;height:15px;margin-left:7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<el-input
v-model=
"scope.row.SortNew"
type=
"number"
min=
"1"
size=
"small"
style=
"display:inline-block;width:
15
0px"
></el-input>
<el-input
v-model=
"scope.row.SortNew"
type=
"number"
min=
"1"
size=
"small"
style=
"display:inline-block;width:
8
0px"
></el-input>
<span
@
click=
"scope.row.editsort=false"
class=
"el-icon-error"
style=
"color: rgb(245, 108, 108);"
></span>
<span
@
click=
"scope.row.editsort=false"
class=
"el-icon-error"
style=
"color: rgb(245, 108, 108);"
></span>
<span
@
click=
"Edit(scope.row,
2
)"
class=
"el-icon-success"
style=
"color:#67c23a"
></span>
<span
@
click=
"Edit(scope.row,
1
)"
class=
"el-icon-success"
style=
"color:#67c23a"
></span>
</
template
>
</
template
>
</template>
</template>
</el-table-column>
</el-table-column>
...
@@ -82,7 +85,10 @@
...
@@ -82,7 +85,10 @@
prop=
"Remark"
prop=
"Remark"
label=
"分类"
>
label=
"分类"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
size=
"mini"
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
</el-tag>
<el-tag
size=
"mini"
v-if=
"scope.row.CategoryList && scope.row.CategoryList.length>0"
>
{{
scope
.
row
.
CategoryList
[
0
].
CategoryName
}}
</el-tag>
<el-tooltip
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
class=
"item"
effect=
"dark"
:content=
"item.CategoryName"
placement=
"top"
>
<span
v-if=
"scope.row.CategoryList.length>1"
>
...
</span>
</el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -105,9 +111,9 @@
...
@@ -105,9 +111,9 @@
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<el-input
v-model=
"scope.row.NameNew"
type=
"number"
min=
"1"
size=
"small"
style=
"display:inline-block;width:150px"
></el-input>
<el-input
v-model=
"scope.row.NameNew"
size=
"small"
style=
"display:inline-block;width:150px"
></el-input>
<span
@
click=
"scope.row.editname=false"
class=
"el-icon-error"
style=
"
color: rgb(245, 108, 108)
;"
></span>
<span
@
click=
"scope.row.editname=false"
class=
"el-icon-error"
style=
"
margin-left:5px;color: rgb(245, 108, 108);position: relative;top: 9px
;"
></span>
<span
@
click=
"Edit(scope.row,2)"
class=
"el-icon-success"
style=
"color:#67c23a"
></span>
<span
@
click=
"Edit(scope.row,2)"
class=
"el-icon-success"
style=
"color:#67c23a
;position: relative;top: 9px;
"
></span>
</
template
>
</
template
>
</div>
</div>
...
@@ -137,7 +143,7 @@
...
@@ -137,7 +143,7 @@
label=
"是否加入快速购买"
>
label=
"是否加入快速购买"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
<el-switch
@
change=
"Edit(scope.row,1)"
@
change=
"Edit(scope.row,1
0
)"
v-model=
"scope.row.IsQuickBuy"
v-model=
"scope.row.IsQuickBuy"
active-color=
"#409EFF"
active-color=
"#409EFF"
:active-value=
"1"
:active-value=
"1"
...
@@ -165,7 +171,7 @@
...
@@ -165,7 +171,7 @@
label=
"操作"
>
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"
Delete(scope.row
)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
<img
@
click=
"
Edit(scope.row,6
)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -177,7 +183,181 @@
...
@@ -177,7 +183,181 @@
:total=
"total"
>
:total=
"total"
>
</el-pagination>
</el-pagination>
</div>
</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=
"checkList"
>
<div
v-for=
"(item,index) in fenleiData"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<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=
"checkList"
>
<div
v-for=
"(item,index) in childList2"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<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=
"checkList"
>
<div
v-for=
"(item,index) in childList3"
:key=
"index"
flex=
"dir:left box:first"
class=
"cat-item"
>
<el-checkbox
:label=
"item"
>
<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 checkList"
: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"
>
取 消
</el-button>
<el-button
@
click=
"chooseFl"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 批量修改 -->
<el-dialog
custom-class=
"plxg"
title=
"批量修改"
:visible
.
sync=
"plDig"
width=
"960px"
>
<span
class=
"absoSpan"
>
已选商品{{GoodsIds.length}}个
</span>
<div
class=
"batch-remark c99 f14"
>
注:每次只能修改一项,修改后点击确定即可生效。如需修改多项,需多次操作。
</div>
<div
style=
"margin-top:15px"
flex=
"dir:left box:first"
>
<div
flex=
"dir:top"
class=
"batch-box-left"
>
<div
flex=
"main:center"
@
click=
"ClearSelect(7)"
:class=
"plszMsg.Type==7?'batch-div-active':''"
>
运费
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(8)"
:class=
"plszMsg.Type==8?'batch-div-active':''"
>
限购
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(9)"
:class=
"plszMsg.Type==9?'batch-div-active':''"
>
积分
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(10)"
:class=
"plszMsg.Type==10?'batch-div-active':''"
>
快速购买
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(11)"
:class=
"plszMsg.Type==11?'batch-div-active':''"
>
面议
</div>
</div>
<div
class=
"batch-box-right"
>
<el-form
class=
"app-batch"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"100px"
>
<el-form-item
v-if=
"plszMsg.Type==7"
label=
"运费设置"
>
<el-tag
v-if=
"ruleSelect.RulesName"
@
close=
"plszMsg.FreightId=-1,ruleSelect={}"
closable
>
{{ruleSelect.RulesName}}
</el-tag>
<el-button
@
click=
"chooseyfDig=true"
style=
"margin-left:10px;"
size=
"small"
>
选择运费
</el-button>
</el-form-item>
<el-form-item
v-if=
"plszMsg.Type==8"
label=
"每人限购"
>
<el-form-item
label-width=
"50px"
label=
"商品"
>
<el-input
:disabled=
"BuyGoodsNumState"
v-model=
"plszMsg.LimitBuyGoodsNum"
style=
"width:254px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
件
</el-button>
</el-input>
<el-checkbox
style=
"margin-left:10px"
v-model=
"BuyGoodsNumState"
>
不限制
</el-checkbox>
</el-form-item>
<el-form-item
label-width=
"50px"
label=
"订单"
>
<el-input
:disabled=
"BuyOrderNumState"
v-model=
"plszMsg.LimitBuyOrderNum"
style=
"width:254px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
单
</el-button>
</el-input>
<el-checkbox
style=
"margin-left:10px"
v-model=
"BuyOrderNumState"
>
不限制
</el-checkbox>
</el-form-item>
</el-form-item>
<
template
v-if=
"plszMsg.Type==9"
>
<el-form-item
label=
"积分赠送"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
<div
slot=
"content"
>
用户购物赠送的积分, 如果不填写或填写0,则默认为不赠送积分
<br/>
如果为百分比则为按成交价格的比例计算积分
<br/>
如: 购买2件,设置10 积分, 不管成交价格是多少, 则购买后获得20积分
<br/>
如: 购买2件,设置10%积分, 成交价格2 * 200= 400, 则购买后获得 40 积分(400*10%)
<br/>
</div>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"plszMsg.IntegralPresent"
style=
"width:670px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<el-button
slot=
"append"
>
分
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"1"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"2"
>
百分比
</el-radio>
</el-button>
</el-input>
</el-form-item>
<el-form-item
label=
"积分抵扣"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"如果设置0,则不支持积分抵扣 如果带%则为按成交价格的比例计算抵扣多少元"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"plszMsg.PointsDeduction"
style=
"width:670px;margin-left:15px"
type=
"number"
min=
"1"
size=
"small"
placeholder=
"请输入内容"
class=
"input-with-select"
>
<template
slot=
"prepend"
>
最多抵扣
</
template
>
<el-button
slot=
"append"
>
分
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"1"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"2"
>
百分比
</el-radio>
</el-button>
</el-input>
</el-form-item>
<el-form-item
label-width=
"110px"
>
<el-checkbox
v-model=
"plszMsg.IsMultipleDeduction"
:true-label=
"1"
:false-label=
"2"
>
允许多件抵扣
</el-checkbox>
</el-form-item>
</template>
<el-form-item
v-if=
"plszMsg.Type==10"
label-width=
"160px"
label=
"是否加入快速购买"
>
<el-switch
v-model=
"plszMsg.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==11"
label-width=
"160px"
label=
"是否加入商品面议"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"如果开启面议,则商品无法在线支付"
placement=
"top"
style=
"position: absolute;left: -22px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-switch
v-model=
"plszMsg.IsGoodsNegotiable"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
</el-form>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"plDig = false"
>
取 消
</el-button>
<el-button
@
click=
"plsetOk"
size=
"small"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 选择运费 -->
<el-dialog
title=
"选择运费"
top=
"2%"
:modal=
"false"
:modal-append-to-body=
'false'
:visible
.
sync=
"chooseyfDig"
width=
"25%"
>
<div>
<el-radio-group
v-model=
"val"
>
<el-radio
@
change=
"YfSelect"
class=
"yfradio"
v-for=
"(item,index) in ruleList"
:key=
"index"
:label=
"item"
>
{{item.RulesName}}
</el-radio>
</el-radio-group>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"chooseyfDig = false,ruleSelect={},plszMsg.FreightId=-1"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"chooseyfDig = false"
type=
"primary"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -186,13 +366,23 @@ export default {
...
@@ -186,13 +366,23 @@ export default {
name
:
"quickBuy"
,
name
:
"quickBuy"
,
data
(){
data
(){
return
{
return
{
chooseyfDig
:
false
,
plDig
:
false
,
flDig
:
false
,
val
:
''
,
dateList
:[],
activeName
:
'first'
,
activeName
:
'first'
,
editState
:
false
,
editState
:
false
,
msg
:{
msg
:{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
15
,
pageSize
:
15
,
Name
:
''
,
Name
:
''
,
IsDefault
:
0
,
GoodsStatus
:
0
,
IsSelectSellOut
:
0
,
CategoryIds
:
''
,
Id
:
0
,
StartTime
:
''
,
EndTime
:
''
,
},
},
total
:
0
,
total
:
0
,
tableData
:[],
tableData
:[],
...
@@ -213,24 +403,203 @@ export default {
...
@@ -213,24 +403,203 @@ export default {
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
}
],
],
},
},
msg1
:{
fenleiData
:[],
Id
:
0
,
checkList
:[],
Name
:
''
,
childList2
:[],
Tier
:
0
,
childList3
:[],
ParentId
:
0
,
GoodsIds
:[],
Enabled
:
1
,
plszMsg
:{
IsShow
:
1
,
GoodsIds
:
''
,
Type
:
10
,
FreightId
:
-
1
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
1
,
PointsDeduction
:
0
,
PointsDeductionType
:
1
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
},
},
ruleList
:[],
ruleSelect
:{},
keepGoodsIds
:
''
,
BuyGoodsNumState
:
true
,
BuyOrderNumState
:
true
,
}
}
},
},
created
(){
created
(){
this
.
getList
();
this
.
getList
();
this
.
getTree
();
this
.
getRule
();
},
},
methods
:{
methods
:{
plsetOk
(){
if
(
this
.
plszMsg
.
Type
==
7
){
if
(
this
.
plszMsg
.
FreightId
==-
1
){
this
.
Error
(
"请选择运费规则"
);
return
;
}
}
if
(
this
.
plszMsg
.
Type
==
8
){
if
(
this
.
plszMsg
.
BuyGoodsNumState
){
this
.
plszMsg
.
LimitBuyGoodsNum
=-
1
}
if
(
this
.
plszMsg
.
BuyOrderNumState
){
this
.
plszMsg
.
LimitBuyOrderNum
=-
1
}
}
this
.
commonSet
(
this
.
plszMsg
);
},
plsetBtn
(){
if
(
this
.
GoodsIds
.
length
==
0
){
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
}
let
idList
=
[];
this
.
GoodsIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
Id
)
})
this
.
keepGoodsIds
=
idList
.
join
(
','
);
this
.
plszMsg
.
GoodsIds
=
this
.
keepGoodsIds
;
this
.
plDig
=
true
;
},
ClearSelect
(
type
){
this
.
plszMsg
=
{
GoodsIds
:
this
.
keepGoodsIds
,
Type
:
type
,
FreightId
:
-
1
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
1
,
PointsDeduction
:
0
,
PointsDeductionType
:
1
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
}
},
YfSelect
(
val
){
this
.
ruleSelect
=
val
;
this
.
plszMsg
.
FreightId
=
val
.
ID
;
},
tableSelect
(
val
){
this
.
GoodsIds
=
val
;
},
// 上架 下架 删除
tableSet
(
num
){
if
(
this
.
GoodsIds
.
length
==
0
){
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
}
let
idList
=
[];
this
.
GoodsIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
Id
)
})
let
GoodsIds
=
idList
.
join
(
','
);
let
msg
=
{
GoodsIds
:
GoodsIds
,
Type
:
num
,
}
let
str
=
""
;
if
(
num
==
4
){
str
=
"批量上架,是否继续"
;
}
if
(
num
==
5
){
str
=
"批量下架,是否继续"
;
}
if
(
num
==
6
){
str
=
"是否确认删除选中的商品?"
;
}
let
that
=
this
;
that
.
$confirm
(
str
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
commonSet
(
msg
);
}).
catch
(()
=>
{
});
},
Edit
(
row
,
num
){
let
addMsg
=
{
GoodsIds
:
row
.
Id
,
Type
:
num
,
Sort
:
row
.
SortNew
,
GoodsName
:
row
.
NameNew
,
IsQuickBuy
:
row
.
IsQuickBuy
};
this
.
commonSet
(
addMsg
)
},
commonSet
(
addMsg
){
this
.
apipost
(
'/api/product/SetProductGoodsQuickUpdate'
,
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
this
.
plDig
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
chooseFl
(){
let
CategoryIds
=
[];
this
.
checkList
.
forEach
(
item
=>
{
CategoryIds
.
push
(
item
.
Id
)
})
this
.
msg
.
CategoryIds
=
CategoryIds
.
join
(
","
);
this
.
getList
();
this
.
flDig
=
false
;
},
getChild3
(
ChildList
){
this
.
childList3
=
ChildList
;
},
getChild2
(
ChildList
){
this
.
childList2
=
ChildList
;
},
exitCheck
(
item
,
index
){
this
.
checkList
.
forEach
((
list
,
k
)
=>
{
if
(
list
.
Id
==
item
.
Id
){
this
.
checkList
.
splice
(
k
,
1
);
}
})
},
handleCheckChange
(
val
){
},
Clearconditions
(){
this
.
msg
.
Name
=
''
;
this
.
msg
.
CategoryIds
=
''
;
this
.
dateList
=
[];
this
.
checkList
=
[];
this
.
getList
();
},
handleClick
(
val
){
handleClick
(
val
){
this
.
msg
.
AuditStatus
=
val
.
$attrs
.
dataId
;
let
dataId
=
val
.
$attrs
.
dataId
;
if
(
dataId
==
0
){
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
if
(
dataId
==
1
){
this
.
msg
.
GoodsStatus
=
1
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
if
(
dataId
==
2
){
this
.
msg
.
GoodsStatus
=
2
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
if
(
dataId
==
3
){
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
1
;
}
this
.
getList
();
},
},
Delete
(
item
){
Delete
(
item
){
let
that
=
this
;
let
that
=
this
;
...
@@ -255,30 +624,18 @@ export default {
...
@@ -255,30 +624,18 @@ export default {
});
});
},
},
Edit
(
row
,
num
){
let
addMsg
=
row
;
addMsg
.
Sort
=
addMsg
.
SortNew
;
addMsg
.
UpdateType
=
num
;
this
.
apipost
(
'/api/product/SetProductServiceInfo'
,
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
this
.
getList
();
},
},
getList
(){
getList
(){
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
){
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
}
else
{
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
EndTime
=
''
;
}
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
apipost
(
"/api/product/GetProductGoodsPageList"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"/api/product/GetProductGoodsPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
...
@@ -296,11 +653,103 @@ export default {
...
@@ -296,11 +653,103 @@ export default {
})
})
},
},
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
;
}
})
},
getRule
(){
let
msg1
=
{
pageIndex
:
1
,
pageSize
:
999
,
RulesName
:
''
,
}
this
.
apipost
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
ruleList
=
pageData
;
}
})
},
},
},
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.plxg
.spmy
.el-form-item__label
{
padding-right
:
26px
;
}
.yfradio
{
display
:
block
;
padding
:
10px
;
}
.plxg
.batch-div-active
{
background-color
:
#e2e2e2
;
}
.plxg
.batch-box-left
div
{
padding
:
5px
0
;
margin
:
5px
0
;
cursor
:
pointer
;
-webkit-border-radius
:
5px
;
-moz-border-radius
:
5px
;
border-radius
:
5px
;
}
.plxg
.batch-box-left
{
width
:
120px
;
border-right
:
1px
solid
#e2e2e2
;
padding
:
0
20px
;
}
.plxg
.el-dialog__body
{
padding-top
:
10px
!important
;
}
.plxg
.absoSpan
{
position
:
absolute
;
top
:
22px
;
left
:
100px
;
}
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.goodsList
.vue-line-clamp
{
.goodsList
.vue-line-clamp
{
display
:
block
;
display
:
block
;
display
:
-webkit-box
;
display
:
-webkit-box
;
...
...
src/components/CommodityMan/goodsServices.vue
View file @
4f77f011
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
width=
"200"
width=
"200"
label=
"操作"
>
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"
Delete(scope.row
)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"
CommonJump('goodsServicesEdit',
{ServiceId:scope.row.Id}
)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/edit.png" alt="">
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
src/components/CommodityMan/goodsServicesEdit.vue
View file @
4f77f011
...
@@ -59,10 +59,14 @@ export default {
...
@@ -59,10 +59,14 @@ export default {
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
},
],
],
},
},
ServiceId
:
-
1
,
}
}
},
},
created
(){
created
(){
// this.getData()
if
(
this
.
$route
.
query
.
ServiceId
){
this
.
ServiceId
=
this
.
$route
.
query
.
ServiceId
;
this
.
getData
()
}
},
},
methods
:{
methods
:{
Save
(
formName
){
Save
(
formName
){
...
@@ -87,7 +91,7 @@ export default {
...
@@ -87,7 +91,7 @@ export default {
},
},
getData
(){
getData
(){
this
.
pageloading
=
true
;
this
.
pageloading
=
true
;
this
.
apipost
(
"/api/product/GetProduct
RecommendSetInfo"
,{
},
res
=>
{
this
.
apipost
(
"/api/product/GetProduct
ServiceInfo"
,{
ServiceId
:
this
.
ServiceId
},
res
=>
{
this
.
pageloading
=
false
;
this
.
pageloading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
if
(
res
.
data
.
resultCode
==
1
){
this
.
addMsg
=
res
.
data
.
data
;
this
.
addMsg
=
res
.
data
.
data
;
...
...
src/router/index.js
View file @
4f77f011
...
@@ -212,8 +212,12 @@ export default new Router({
...
@@ -212,8 +212,12 @@ export default new Router({
name
:
'goodsList'
,
name
:
'goodsList'
,
component
:
resolve
=>
require
([
'@/components/CommodityMan/goodsList'
],
resolve
),
component
:
resolve
=>
require
([
'@/components/CommodityMan/goodsList'
],
resolve
),
},
},
// 商品管理 商品列表新增
{
path
:
'/goodsListEdit'
,
name
:
'goodsListEdit'
,
component
:
resolve
=>
require
([
'@/components/CommodityMan/goodsListEdit'
],
resolve
),
},
//设置 基础设置
//设置 基础设置
{
{
path
:
'/basicSetUp'
,
path
:
'/basicSetUp'
,
...
...
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