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
9a757e36
Commit
9a757e36
authored
Sep 15, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
199dc0dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
811 additions
and
864 deletions
+811
-864
goodsList.vue
src/components/CommodityMan/goodsList.vue
+811
-864
No files found.
src/components/CommodityMan/goodsList.vue
View file @
9a757e36
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
<div
class=
"goodsList"
>
<div
class=
"goodsList"
>
<div
class=
"head-title"
>
<div
class=
"head-title"
>
商品列表
商品列表
<el-button
@
click=
"Export"
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
商品导出
</el-button>
<el-button
@
click=
"Export"
style=
"float:right;margin-top: -5px;margin-left:20px;"
size=
"small"
type=
"primary"
>
商品导出
<el-button
@
click=
"CommonJump('goodsListEdit',
{hpState:hpState,FxState:FxState})" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加商品
</el-button>
</el-button>
<el-button
@
click=
"CommonJump('goodsListEdit',
{hpState:hpState,FxState:FxState})"
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>
<div
class=
"content"
>
<div
class=
"content"
>
<div>
<div>
...
@@ -18,201 +19,143 @@
...
@@ -18,201 +19,143 @@
</div>
</div>
<div>
<div>
<el-button
@
click=
"flDig=true"
style=
"margin-right:10px;"
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='',msg.pageIndex=1,getList()"
type=
"danger"
style=
"margin-right:10px;"
size=
"small"
>
清除分类
</el-button>
<el-button
v-show=
"checkList.length>0"
@
click=
"checkList=[],msg.CategoryIds='',msg.pageIndex=1,getList()"
type=
"danger"
style=
"margin-right:10px;"
size=
"small"
>
清除分类
</el-button>
<span>
添加时间:
</span>
<span>
添加时间:
</span>
<el-date-picker
<el-date-picker
v-model=
"dateList"
@
change=
"msg.pageIndex=1,getList()"
size=
"small"
type=
"datetimerange"
v-model=
"dateList"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
@
change=
"msg.pageIndex=1,getList()"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-date-picker>
<div
class=
"searchInput"
style=
"width:250px;margin-right: 0px;"
>
<div
class=
"searchInput"
style=
"width:250px;margin-right: 0px;"
>
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入名称搜索"
placeholder=
"请输入名称搜索"
v-model=
"msg.Name"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
v-model=
"msg.Name"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
</el-input>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<div
class=
"searchInput"
style=
"width:250px"
>
<div
class=
"searchInput"
style=
"width:250px"
>
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
<el-input
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入ID搜索"
placeholder=
"请输入ID搜索"
v-model=
"msg.Id"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
v-model=
"msg.Id"
@
clear=
"msg.pageIndex=1,getList()"
size=
"small"
clearable
>
</el-input>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<span
@
click=
"Clearconditions"
v-if=
"msg.Name!='' || msg.CategoryIds!='' || (dateList && dateList.length>0)"
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
@
click=
"tableSet(4)"
style=
"margin-left:10px;"
size=
"mini"
>
上架
</el-button>
<el-button
@
click=
"tableSet(4)"
style=
"margin-left:10px;"
size=
"mini"
>
上架
</el-button>
<el-button
@
click=
"tableSet(5)"
style=
"margin-left:10px;"
size=
"mini"
>
下架
</el-button>
<el-button
@
click=
"tableSet(5)"
style=
"margin-left:10px;"
size=
"mini"
>
下架
</el-button>
<el-button
@
click=
"tableSet(6)"
style=
"margin-left:10px;"
size=
"mini"
>
删除
</el-button>
<el-button
@
click=
"tableSet(6)"
style=
"margin-left:10px;"
size=
"mini"
>
删除
</el-button>
<el-button
@
click=
"plsetBtn"
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"
v-loading=
"loading"
border
sortable=
'custom'
@
sort-change=
'getSort'
:data=
"tableData"
@
selection-change=
"tableSelect"
style=
"width: 100%;margin:20px 0"
>
v-loading=
"loading"
<el-table-column
type=
"selection"
width=
"55"
>
border
sortable=
'custom'
@
sort-change=
'getSort'
@
selection-change=
"tableSelect"
style=
"width: 100%;margin:20px 0"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"Id"
width=
"80"
sortable
label=
"ID"
>
prop=
"Id"
width=
"80"
sortable
label=
"ID"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"address"
sortable
label=
"排序"
>
prop=
"address"
sortable
label=
"排序"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"!scope.row.editsort"
>
<template
v-if=
"!scope.row.editsort"
>
<span>
{{
scope
.
row
.
Sort
}}
</span>
<span>
{{
scope
.
row
.
Sort
}}
</span>
<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:70px"
></el-input>
<el-input
v-model=
"scope.row.SortNew"
type=
"number"
min=
"1"
size=
"small"
style=
"display:inline-block;width:70px"
></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,1)"
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>
<el-table-column
<el-table-column
prop=
"Remark"
label=
"分类"
>
prop=
"Remark"
label=
"分类"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
size=
"mini"
v-if=
"scope.row.CategoryList && scope.row.CategoryList.length>0"
>
{{
scope
.
row
.
CategoryList
[
0
].
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
class=
"item"
effect=
"dark"
placement=
"top"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
>
<div
slot=
"content"
>
<div
slot=
"content"
>
<span
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
</span>
<span
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
</span>
</div>
</div>
<span
v-if=
"scope.row.CategoryList.length>1 && index==0"
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
...
</span>
<span
v-if=
"scope.row.CategoryList.length>1 && index==0"
v-for=
"(item,index) in scope.row.CategoryList"
:key=
"index"
>
...
</span>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"address"
width=
"300"
label=
"商品名称"
>
prop=
"address"
width=
"300"
label=
"商品名称"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
flex=
"box:first"
>
<div
flex=
"box:first"
>
<img
style=
"width:50px;height:50px;margin-right:1px"
:src=
"scope.row.CoverImage"
alt=
""
>
<el-image
title=
"点击查看大图"
style=
"width:50px;height:50px;margin-right:1px"
:src=
"scope.row.CoverImage"
:preview-src-list=
"scope.row.CarouselImageList"
>
</el-image>
<template
v-if=
"!scope.row.editname"
>
<template
v-if=
"!scope.row.editname"
>
<div
flex=
"cross:top"
style=
"display:inline-flex"
>
<div
flex=
"cross:top"
style=
"display:inline-flex"
>
<div
flex=
"dir:left"
>
<div
flex=
"dir:left"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Name"
placement=
"top"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Name"
placement=
"top"
>
<div
class=
"vue-line-clamp"
style=
"word-break: break-all; -webkit-line-clamp: 2;"
>
<div
class=
"vue-line-clamp"
style=
"word-break: break-all; -webkit-line-clamp: 2;"
>
<span>
{{
scope
.
row
.
Name
}}
</span>
<span>
{{
scope
.
row
.
Name
}}
</span>
</div>
</div>
</el-tooltip>
</el-tooltip>
<img
@
click=
"scope.row.editname=true,scope.row.NameNew=scope.row.Name"
style=
"width:15px;height:15px;margin-left:7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
>
<img
@
click=
"scope.row.editname=true,scope.row.NameNew=scope.row.Name"
style=
"width:15px;height:15px;margin-left:7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<el-input
v-model=
"scope.row.NameNew"
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=
"margin-left:5px;color: rgb(245, 108, 108);position: relative;top: 9px;"
></span>
<span
@
click=
"scope.row.editname=false"
class=
"el-icon-error"
<span
@
click=
"Edit(scope.row,2)"
class=
"el-icon-success"
style=
"color:#67c23a;position: relative;top: 9px;"
></span>
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;position: relative;top: 9px;"
></span>
</
template
>
</
template
>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"SellingPrice"
width=
"100"
sortable
label=
"售价"
>
prop=
"SellingPrice"
width=
"100"
sortable
label=
"售价"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"InventoryNum"
width=
"100"
sortable
label=
"库存"
>
prop=
"InventoryNum"
width=
"100"
sortable
label=
"库存"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.InventoryNum==0"
style=
"color:red"
>
售罄
</span>
<span
v-if=
"scope.row.InventoryNum==0"
style=
"color:red"
>
售罄
</span>
<span
v-else
>
{{
scope
.
row
.
InventoryNum
}}
</span>
<span
v-else
>
{{
scope
.
row
.
InventoryNum
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
width=
"120"
>
width=
"120"
<
template
slot=
"header"
>
>
<
template
slot=
"header"
>
已出售量
已出售量
<el-tooltip
effect=
"dark"
content=
"已出售量=实际销量+虚拟销量,按实际销量排序"
placement=
"top"
>
<el-tooltip
effect=
"dark"
content=
"已出售量=实际销量+虚拟销量,按实际销量排序"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
GoodsBuyNum
}}
+
{{
scope
.
row
.
SalesNum
}}
</span>
<span
>
{{
scope
.
row
.
GoodsBuyNum
}}
+
{{
scope
.
row
.
SalesNum
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"UpdateDate"
width=
"110"
label=
"是否加入快速购买"
>
<el-table-column
prop=
"UpdateDate"
width=
"110"
label=
"是否加入快速购买"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-switch
<el-switch
@
change=
"Edit(scope.row,10)"
v-model=
"scope.row.IsQuickBuy"
active-color=
"#409EFF"
@
change=
"Edit(scope.row,10)"
:active-value=
"1"
:inactive-value=
"0"
>
v-model=
"scope.row.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"CreateDate"
width=
"160"
label=
"添加时间"
>
prop=
"CreateDate"
width=
"160"
label=
"添加时间"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"UpdateDate"
width=
"100"
label=
"状态"
>
prop=
"UpdateDate"
width=
"100"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.GoodsStatus==1"
type=
"success"
>
销售中
</el-tag>
<el-tag
v-if=
"scope.row.GoodsStatus==1"
type=
"success"
>
销售中
</el-tag>
<el-tag
v-if=
"scope.row.GoodsStatus==2"
type=
"warning"
>
下架中
</el-tag>
<el-tag
v-if=
"scope.row.GoodsStatus==2"
type=
"warning"
>
下架中
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"address"
width=
"200"
label=
"操作"
>
prop=
"address"
width=
"200"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"goGoodsEdit(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"goGoodsEdit(scope.row.Id)"
style=
"width:32px;height:32px;margin:0 10px"
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
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=
""
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<el-pagination
style=
"text-align:right"
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
background
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
</el-pagination>
</el-pagination>
</div>
</div>
<!-- 选择分类 -->
<!-- 选择分类 -->
...
@@ -232,7 +175,6 @@
...
@@ -232,7 +175,6 @@
</div>
</div>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
</el-col>
</el-col>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<el-col
v-show=
"childList2.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
...
@@ -249,7 +191,6 @@
...
@@ -249,7 +191,6 @@
</div>
</div>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
</el-col>
</el-col>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
<el-col
v-show=
"childList3.length>0"
:span=
"8"
style=
"padding:0 10px;box-sizing:border-box"
>
...
@@ -266,12 +207,12 @@
...
@@ -266,12 +207,12 @@
</div>
</div>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<div
class=
"tag-box"
>
<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>
<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>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"flDig = false"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"flDig = false"
>
取 消
</el-button>
...
@@ -290,41 +231,47 @@
...
@@ -290,41 +231,47 @@
<div
flex=
"main:center"
@
click=
"ClearSelect(10)"
:class=
"plszMsg.Type==10?'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
flex=
"main:center"
@
click=
"ClearSelect(11)"
:class=
"plszMsg.Type==11?'batch-div-active':''"
>
面议
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(12)"
:class=
"plszMsg.Type==12?'batch-div-active':''"
>
供应商
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(12)"
:class=
"plszMsg.Type==12?'batch-div-active':''"
>
供应商
</div>
</div>
</div>
<div
class=
"batch-box-right"
>
<div
class=
"batch-box-right"
>
<el-form
class=
"app-batch"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"100px"
>
<el-form
class=
"app-batch"
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"100px"
>
<el-form-item
v-if=
"plszMsg.Type==7"
label=
"运费设置"
>
<el-form-item
v-if=
"plszMsg.Type==7"
label=
"运费设置"
>
<el-tag
v-if=
"ruleSelect.RulesName"
@
close=
"plszMsg.FreightId=0,ruleSelect={}"
closable
>
{{ruleSelect.RulesName}}
</el-tag>
<el-tag
v-if=
"ruleSelect.RulesName"
@
close=
"plszMsg.FreightId=0,ruleSelect={}"
closable
>
{{ruleSelect.RulesName}}
</el-tag>
<el-button
@
click=
"chooseyfDig=true"
style=
"margin-left:10px;"
size=
"small"
>
选择运费
</el-button>
<el-button
@
click=
"chooseyfDig=true"
style=
"margin-left:10px;"
size=
"small"
>
选择运费
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"plszMsg.Type==8"
label=
"每人限购"
>
<el-form-item
v-if=
"plszMsg.Type==8"
label=
"每人限购"
>
<el-form-item
label-width=
"50px"
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-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-button
slot=
"append"
>
件
</el-button>
</el-input>
</el-input>
<el-checkbox
@
change=
"goodChange(BuyGoodsNumState,1)"
style=
"margin-left:10px"
v-model=
"BuyGoodsNumState"
>
不限制
</el-checkbox>
<el-checkbox
@
change=
"goodChange(BuyGoodsNumState,1)"
style=
"margin-left:10px"
v-model=
"BuyGoodsNumState"
>
不限制
</el-checkbox>
</el-form-item>
</el-form-item>
<el-form-item
label-width=
"50px"
label=
"订单"
>
<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-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-button
slot=
"append"
>
单
</el-button>
</el-input>
</el-input>
<el-checkbox
@
change=
"goodChange(BuyOrderNumState,2)"
style=
"margin-left:10px"
v-model=
"BuyOrderNumState"
>
不限制
</el-checkbox>
<el-checkbox
@
change=
"goodChange(BuyOrderNumState,2)"
style=
"margin-left:10px"
v-model=
"BuyOrderNumState"
>
不限制
</el-checkbox>
</el-form-item>
</el-form-item>
</el-form-item>
</el-form-item>
<
template
v-if=
"plszMsg.Type==9"
>
<
template
v-if=
"plszMsg.Type==9"
>
<el-form-item
label=
"积分赠送"
>
<el-form-item
label=
"积分赠送"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
style=
"position: absolute;left: -10px;top:12px"
>
style=
"position: absolute;left: -10px;top:12px"
>
<div
slot=
"content"
>
<div
slot=
"content"
>
用户购物赠送的积分, 如果不填写或填写0,则默认为不赠送积分
<br
/>
用户购物赠送的积分, 如果不填写或填写0,则默认为不赠送积分
<br
/>
如果为百分比则为按成交价格的比例计算积分
<br
/>
如果为百分比则为按成交价格的比例计算积分
<br
/>
如: 购买2件,设置10 积分, 不管成交价格是多少, 则购买后获得20积分
<br
/>
如: 购买2件,设置10 积分, 不管成交价格是多少, 则购买后获得20积分
<br
/>
如: 购买2件,设置10%积分, 成交价格2 * 200= 400, 则购买后获得 40 积分(400*10%)
<br
/>
如: 购买2件,设置10%积分, 成交价格2 * 200= 400, 则购买后获得 40 积分(400*10%)
<br
/>
</div>
</div>
<i
class=
"el-tooltip el-icon-info"
></i>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
</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-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-button
slot=
"append"
>
分
分
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"2"
>
固定值
</el-radio>
...
@@ -337,7 +284,8 @@
...
@@ -337,7 +284,8 @@
style=
"position: absolute;left: -10px;top:12px"
>
style=
"position: absolute;left: -10px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
</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"
>
<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
>
<template
slot=
"prepend"
>
最多抵扣
</
template
>
<el-button
slot=
"append"
>
<el-button
slot=
"append"
>
分
分
...
@@ -349,14 +297,9 @@
...
@@ -349,14 +297,9 @@
<el-form-item
label-width=
"110px"
>
<el-form-item
label-width=
"110px"
>
<el-checkbox
v-model=
"plszMsg.IsMultipleDeduction"
:true-label=
"1"
:false-label=
"2"
>
允许多件抵扣
</el-checkbox>
<el-checkbox
v-model=
"plszMsg.IsMultipleDeduction"
:true-label=
"1"
:false-label=
"2"
>
允许多件抵扣
</el-checkbox>
</el-form-item>
</el-form-item>
</template>
</template>
<el-form-item
v-if=
"plszMsg.Type==10"
label-width=
"160px"
label=
"是否加入快速购买"
>
<el-form-item
v-if=
"plszMsg.Type==10"
label-width=
"160px"
label=
"是否加入快速购买"
>
<el-switch
<el-switch
v-model=
"plszMsg.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
v-model=
"plszMsg.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==11"
label-width=
"160px"
label=
"是否加入商品面议"
>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==11"
label-width=
"160px"
label=
"是否加入商品面议"
>
...
@@ -364,14 +307,10 @@
...
@@ -364,14 +307,10 @@
style=
"position: absolute;left: -22px;top:12px"
>
style=
"position: absolute;left: -22px;top:12px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
</el-tooltip>
<el-switch
<el-switch
v-model=
"plszMsg.IsGoodsNegotiable"
active-color=
"#409EFF"
:active-value=
"1"
v-model=
"plszMsg.IsGoodsNegotiable"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
:inactive-value=
"0"
>
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==12"
label-width=
"160px"
label=
"供应商"
>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type==12"
label-width=
"160px"
label=
"供应商"
>
<el-select
class=
"w150"
style=
"margin-right: 10px;"
v-model=
"plszMsg.SupplierId"
size=
"small"
<el-select
class=
"w150"
style=
"margin-right: 10px;"
v-model=
"plszMsg.SupplierId"
size=
"small"
placeholder=
"请选择"
@
change=
'changeSupplier'
>
placeholder=
"请选择"
@
change=
'changeSupplier'
>
...
@@ -379,7 +318,6 @@
...
@@ -379,7 +318,6 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</div>
</div>
...
@@ -389,10 +327,12 @@
...
@@ -389,10 +327,12 @@
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 选择运费 -->
<!-- 选择运费 -->
<el-dialog
title=
"选择运费"
top=
"2%"
:modal=
"false"
:modal-append-to-body=
'false'
:visible
.
sync=
"chooseyfDig"
width=
"25%"
>
<el-dialog
title=
"选择运费"
top=
"2%"
:modal=
"false"
:modal-append-to-body=
'false'
:visible
.
sync=
"chooseyfDig"
width=
"25%"
>
<div>
<div>
<el-radio-group
v-model=
"val"
>
<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
@
change=
"YfSelect"
class=
"yfradio"
v-for=
"(item,index) in ruleList"
:key=
"index"
:label=
"item"
>
{{item.RulesName}}
</el-radio>
</el-radio-group>
</el-radio-group>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -404,228 +344,225 @@
...
@@ -404,228 +344,225 @@
</template>
</template>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"quickBuy"
,
name
:
"quickBuy"
,
data
(){
data
()
{
return
{
return
{
chooseyfDig
:
false
,
chooseyfDig
:
false
,
plDig
:
false
,
plDig
:
false
,
flDig
:
false
,
flDig
:
false
,
val
:
''
,
val
:
''
,
dateList
:[],
dateList
:
[],
activeName
:
'first'
,
activeName
:
'first'
,
editState
:
false
,
editState
:
false
,
msg
:{
msg
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
15
,
pageSize
:
15
,
Name
:
''
,
Name
:
''
,
GoodsStatus
:
0
,
GoodsStatus
:
0
,
IsSelectSellOut
:
0
,
IsSelectSellOut
:
0
,
CategoryIds
:
''
,
CategoryIds
:
''
,
Id
:
''
,
Id
:
''
,
StartTime
:
''
,
StartTime
:
''
,
EndTime
:
''
,
EndTime
:
''
,
OrderBy
:
0
,
OrderBy
:
0
,
},
},
total
:
0
,
total
:
0
,
tableData
:[],
tableData
:
[],
loading
:
false
,
loading
:
false
,
options
:[],
options
:
[],
addMsg
:{
addMsg
:
{
Id
:
0
,
Id
:
0
,
Sort
:
''
,
Sort
:
''
,
Name
:
''
,
Name
:
''
,
IsDefault
:
1
,
IsDefault
:
1
,
Remark
:
''
,
Remark
:
''
,
UpdateType
:
1
,
UpdateType
:
1
,
},
},
rules
:{
rules
:
{
CategoryIdNew
:
[
CategoryIdNew
:
[{
{
required
:
true
,
message
:
'分类不能为空'
,
trigger
:
'change'
}
required
:
true
,
],
message
:
'分类不能为空'
,
Sort
:
[
trigger
:
'change'
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
}
}],
],
Sort
:
[{
},
required
:
true
,
fenleiData
:[],
message
:
'请输入排序'
,
checkList
:[],
trigger
:
'blur'
childList2
:[],
}],
childList3
:[],
},
GoodsIds
:[],
fenleiData
:
[],
plszMsg
:{
checkList
:
[],
GoodsIds
:
''
,
childList2
:
[],
Type
:
7
,
childList3
:
[],
FreightId
:
0
,
GoodsIds
:
[],
LimitBuyGoodsNum
:
-
1
,
plszMsg
:
{
LimitBuyOrderNum
:
-
1
,
GoodsIds
:
''
,
IntegralPresent
:
0
,
Type
:
7
,
IntegralPresentType
:
2
,
FreightId
:
0
,
PointsDeduction
:
0
,
LimitBuyGoodsNum
:
-
1
,
PointsDeductionType
:
2
,
LimitBuyOrderNum
:
-
1
,
IsMultipleDeduction
:
2
,
IntegralPresent
:
0
,
IsQuickBuy
:
2
,
IntegralPresentType
:
2
,
IsGoodsNegotiable
:
2
,
PointsDeduction
:
0
,
SupplierId
:
''
PointsDeductionType
:
2
,
},
IsMultipleDeduction
:
2
,
ruleList
:[],
IsQuickBuy
:
2
,
ruleSelect
:{},
IsGoodsNegotiable
:
2
,
keepGoodsIds
:
''
,
SupplierId
:
''
BuyGoodsNumState
:
true
,
},
BuyOrderNumState
:
true
,
ruleList
:
[],
hpState
:
0
,
ruleSelect
:
{},
FxState
:
0
keepGoodsIds
:
''
,
}
BuyGoodsNumState
:
true
,
},
BuyOrderNumState
:
true
,
created
(){
hpState
:
0
,
FxState
:
0
}
},
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getTree
();
this
.
getTree
();
this
.
getRule
();
this
.
getRule
();
this
.
getHpState
();
this
.
getHpState
();
this
.
getFxState
();
this
.
getFxState
();
this
.
getSupplierList
()
//获取供应商
this
.
getSupplierList
()
//获取供应商
},
},
methods
:{
methods
:
{
//获取是否开启和平返佣
//获取是否开启和平返佣
getHpState
()
{
getHpState
()
{
this
.
apipost
(
"/api/user/GetHpDistributorIsEnabled"
,
{},
res
=>
{
this
.
apipost
(
"/api/user/GetHpDistributorIsEnabled"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
hpState
=
res
.
data
.
data
;
this
.
hpState
=
res
.
data
.
data
;
}
}
})
})
},
},
//是否开启粉象返佣
//是否开启粉象返佣
getFxState
()
{
getFxState
()
{
this
.
apipost
(
"/api/user/GetIsEnableFXDistributorGrade"
,
{},
res
=>
{
this
.
apipost
(
"/api/user/GetIsEnableFXDistributorGrade"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
FxState
=
res
.
data
.
data
;
this
.
FxState
=
res
.
data
.
data
;
}
}
})
})
},
},
goodChange
(
val
,
num
){
goodChange
(
val
,
num
)
{
if
(
!
val
){
if
(
!
val
)
{
if
(
num
==
1
){
if
(
num
==
1
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
0
;
this
.
plszMsg
.
LimitBuyGoodsNum
=
0
;
}
else
if
(
num
==
2
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
0
;
}
}
else
if
(
num
==
2
){
this
.
plszMsg
.
LimitBuyOrderNum
=
0
;
}
}
}
},
},
Export
()
{
Export
()
{
let
msg
=
this
.
msg
;
let
msg
=
this
.
msg
;
if
(
msg
.
Id
==
''
)
{
if
(
msg
.
Id
==
''
)
{
msg
.
Id
=
0
msg
.
Id
=
0
}
}
msg
=
JSON
.
parse
(
JSON
.
stringify
(
msg
));
msg
=
JSON
.
parse
(
JSON
.
stringify
(
msg
));
msg
.
pageSize
=
999
;
msg
.
pageSize
=
999
;
this
.
GetLocalFile
(
this
.
GetLocalFile
(
"/api/product/GetProductGoodsListToExcel"
,
"/api/product/GetProductGoodsListToExcel"
,
msg
,
msg
,
"商品列表.xls"
"商品列表.xls"
);
);
},
},
plsetOk
()
{
plsetOk
()
{
if
(
this
.
plszMsg
.
Type
==
7
)
{
if
(
this
.
plszMsg
.
Type
==
7
)
{
// if(this.plszMsg.FreightId==0){
// if(this.plszMsg.FreightId==0){
// this.Error("请选择运费规则");
// this.Error("请选择运费规则");
// return;
// return;
// }
// }
}
}
if
(
this
.
plszMsg
.
Type
==
8
)
{
if
(
this
.
plszMsg
.
Type
==
8
)
{
if
(
this
.
plszMsg
.
BuyGoodsNumState
)
{
if
(
this
.
plszMsg
.
BuyGoodsNumState
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
-
1
this
.
plszMsg
.
LimitBuyGoodsNum
=
-
1
}
}
if
(
this
.
plszMsg
.
BuyOrderNumState
)
{
if
(
this
.
plszMsg
.
BuyOrderNumState
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
-
1
this
.
plszMsg
.
LimitBuyOrderNum
=
-
1
}
}
}
}
let
mall_userInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
)
let
mall_userInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
)
if
(
mall_userInfo
.
TenantId
==
1
&&
mall_userInfo
.
MallBaseId
==
1
)
{
if
(
mall_userInfo
.
TenantId
==
1
&&
mall_userInfo
.
MallBaseId
==
1
)
{
if
(
this
.
plszMsg
.
SupplierId
==
''
)
{
if
(
this
.
plszMsg
.
SupplierId
==
''
)
{
this
.
Error
(
"请选择供应商!"
);
this
.
Error
(
"请选择供应商!"
);
return
return
}
else
{
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
this
.
commonSet
(
this
.
plszMsg
);
}
}
}
else
{
}
else
{
if
(
this
.
plszMsg
.
SupplierId
==
''
)
{
if
(
this
.
plszMsg
.
SupplierId
==
''
)
{
this
.
plszMsg
.
SupplierId
=
0
this
.
plszMsg
.
SupplierId
=
0
this
.
commonSet
(
this
.
plszMsg
)
this
.
commonSet
(
this
.
plszMsg
)
}
else
{
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
this
.
commonSet
(
this
.
plszMsg
);
}
}
}
}
},
},
plsetBtn
()
{
plsetBtn
()
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的商品!"
);
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
return
;
}
}
let
idList
=
[];
let
idList
=
[];
this
.
GoodsIds
.
forEach
(
item
=>
{
this
.
GoodsIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
Id
)
idList
.
push
(
item
.
Id
)
})
})
this
.
keepGoodsIds
=
idList
.
join
(
','
);
this
.
keepGoodsIds
=
idList
.
join
(
','
);
this
.
plszMsg
.
GoodsIds
=
this
.
keepGoodsIds
;
this
.
plszMsg
.
GoodsIds
=
this
.
keepGoodsIds
;
this
.
plszMsg
.
SupplierId
=
''
this
.
plszMsg
.
SupplierId
=
''
this
.
plDig
=
true
;
this
.
plDig
=
true
;
},
},
ClearSelect
(
type
)
{
ClearSelect
(
type
){
this
.
plszMsg
=
{
this
.
plszMsg
=
{
GoodsIds
:
this
.
keepGoodsIds
,
GoodsIds
:
this
.
keepGoodsIds
,
Type
:
type
,
Type
:
type
,
FreightId
:
0
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
''
SupplierId
:
''
}
}
},
},
YfSelect
(
val
)
{
YfSelect
(
val
){
this
.
ruleSelect
=
val
;
this
.
ruleSelect
=
val
;
this
.
plszMsg
.
FreightId
=
val
.
ID
;
this
.
plszMsg
.
FreightId
=
val
.
ID
;
},
},
tableSelect
(
val
)
{
tableSelect
(
val
){
this
.
GoodsIds
=
val
;
this
.
GoodsIds
=
val
;
},
},
// 上架 下架 删除
// 上架 下架 删除
tableSet
(
num
)
{
tableSet
(
num
)
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的商品!"
);
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
return
;
}
}
let
idList
=
[];
let
idList
=
[];
this
.
GoodsIds
.
forEach
(
item
=>
{
this
.
GoodsIds
.
forEach
(
item
=>
{
idList
.
push
(
item
.
Id
)
idList
.
push
(
item
.
Id
)
})
})
let
GoodsIds
=
idList
.
join
(
','
);
let
GoodsIds
=
idList
.
join
(
','
);
let
msg
=
{
let
msg
=
{
GoodsIds
:
GoodsIds
,
GoodsIds
:
GoodsIds
,
Type
:
num
,
Type
:
num
,
}
}
let
str
=
""
;
let
str
=
""
;
if
(
num
==
4
)
{
if
(
num
==
4
)
{
str
=
"批量上架,是否继续"
;
str
=
"批量上架,是否继续"
;
}
}
if
(
num
==
5
)
{
if
(
num
==
5
)
{
str
=
"批量下架,是否继续"
;
str
=
"批量下架,是否继续"
;
}
}
if
(
num
==
6
)
{
if
(
num
==
6
)
{
str
=
"是否确认删除选中的商品?"
;
str
=
"是否确认删除选中的商品?"
;
}
}
let
that
=
this
;
let
that
=
this
;
that
.
$confirm
(
str
,
'提示'
,
{
that
.
$confirm
(
str
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -633,26 +570,25 @@ export default {
...
@@ -633,26 +570,25 @@ export default {
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
commonSet
(
msg
);
this
.
commonSet
(
msg
);
}).
catch
(()
=>
{
}).
catch
(()
=>
{
});
});
},
},
Edit
(
row
,
num
)
{
Edit
(
row
,
num
)
{
let
addMsg
=
{
let
addMsg
=
{
GoodsIds
:
row
.
Id
,
GoodsIds
:
row
.
Id
,
Type
:
num
,
Type
:
num
,
Sort
:
row
.
SortNew
,
Sort
:
row
.
SortNew
,
GoodsName
:
row
.
NameNew
,
GoodsName
:
row
.
NameNew
,
IsQuickBuy
:
row
.
IsQuickBuy
IsQuickBuy
:
row
.
IsQuickBuy
};
};
this
.
commonSet
(
addMsg
)
this
.
commonSet
(
addMsg
)
},
},
commonSet
(
addMsg
)
{
commonSet
(
addMsg
)
{
this
.
apipost
(
'/api/product/SetProductGoodsQuickUpdate'
,
addMsg
,
this
.
apipost
(
'/api/product/SetProductGoodsQuickUpdate'
,
addMsg
,
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
this
.
Success
(
res
.
data
.
message
)
this
.
plDig
=
false
;
this
.
plDig
=
false
;
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
}
}
...
@@ -660,72 +596,72 @@ export default {
...
@@ -660,72 +596,72 @@ export default {
null
null
);
);
},
},
chooseFl
()
{
chooseFl
()
{
let
CategoryIds
=
[];
let
CategoryIds
=
[];
this
.
checkList
.
forEach
(
item
=>
{
this
.
checkList
.
forEach
(
item
=>
{
CategoryIds
.
push
(
item
.
Id
)
CategoryIds
.
push
(
item
.
Id
)
})
})
this
.
msg
.
pageIndex
=
1
this
.
msg
.
pageIndex
=
1
this
.
msg
.
CategoryIds
=
CategoryIds
.
join
(
","
);
this
.
msg
.
CategoryIds
=
CategoryIds
.
join
(
","
);
this
.
getList
();
this
.
getList
();
this
.
flDig
=
false
;
this
.
flDig
=
false
;
},
},
getChild3
(
ChildList
)
{
getChild3
(
ChildList
)
{
this
.
childList3
=
ChildList
;
this
.
childList3
=
ChildList
;
},
},
getChild2
(
ChildList
)
{
getChild2
(
ChildList
)
{
this
.
childList2
=
ChildList
;
this
.
childList2
=
ChildList
;
},
},
exitCheck
(
item
,
index
)
{
exitCheck
(
item
,
index
)
{
this
.
checkList
.
forEach
((
list
,
k
)
=>
{
this
.
checkList
.
forEach
((
list
,
k
)
=>
{
if
(
list
.
Id
==
item
.
Id
)
{
if
(
list
.
Id
==
item
.
Id
)
{
this
.
checkList
.
splice
(
k
,
1
);
this
.
checkList
.
splice
(
k
,
1
);
}
}
})
})
},
},
handleCheckChange
(
val
){
handleCheckChange
(
val
)
{},
},
Clearconditions
()
{
Clearconditions
(){
this
.
msg
.
Name
=
''
;
this
.
msg
.
Name
=
''
;
this
.
msg
.
CategoryIds
=
''
;
this
.
msg
.
CategoryIds
=
''
;
this
.
dateList
=
[];
this
.
dateList
=
[];
this
.
checkList
=
[];
this
.
checkList
=
[];
this
.
getList
();
this
.
getList
();
},
},
handleClick
(
val
)
{
handleClick
(
val
)
{
let
dataId
=
val
.
$attrs
.
dataId
;
let
dataId
=
val
.
$attrs
.
dataId
;
if
(
dataId
==
0
)
{
if
(
dataId
==
0
)
{
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
}
if
(
dataId
==
1
)
{
if
(
dataId
==
1
)
{
this
.
msg
.
GoodsStatus
=
1
;
this
.
msg
.
GoodsStatus
=
1
;
this
.
msg
.
IsSelectSellOut
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
}
if
(
dataId
==
2
)
{
if
(
dataId
==
2
)
{
this
.
msg
.
GoodsStatus
=
2
;
this
.
msg
.
GoodsStatus
=
2
;
this
.
msg
.
IsSelectSellOut
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
}
}
if
(
dataId
==
3
)
{
if
(
dataId
==
3
)
{
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
1
;
this
.
msg
.
IsSelectSellOut
=
1
;
}
}
this
.
msg
.
pageIndex
=
1
this
.
msg
.
pageIndex
=
1
this
.
getList
();
this
.
getList
();
},
},
Delete
(
item
)
{
Delete
(
item
)
{
let
that
=
this
;
let
that
=
this
;
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
that
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
apipost
(
'/api/product/DelProcudtGoodsInfo'
,{
GoodsId
:
item
.
Id
},
this
.
apipost
(
'/api/product/DelProcudtGoodsInfo'
,
{
GoodsId
:
item
.
Id
},
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
this
.
Success
(
res
.
data
.
message
)
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
}
}
...
@@ -733,76 +669,71 @@ export default {
...
@@ -733,76 +669,71 @@ export default {
null
null
);
);
}).
catch
(()
=>
{
}).
catch
(()
=>
{
});
});
},
},
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
)
{
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
){
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
}
else
{
}
else
{
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
StartTime
=
''
;
this
.
msg
.
EndTime
=
''
;
this
.
msg
.
EndTime
=
''
;
}
}
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
))
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
))
if
(
msg
.
Id
==
''
)
{
if
(
msg
.
Id
==
''
){
msg
.
Id
=
0
;
msg
.
Id
=
0
;
}
}
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
apipost
(
"/api/product/GetProductGoodsPageList"
,
msg
,
res
=>
{
this
.
apipost
(
"/api/product/GetProductGoodsPageList"
,
msg
,
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
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
;
pageData
.
forEach
(
item
=>
{
pageData
.
forEach
(
item
=>
{
item
.
SortNew
=
item
.
Sort
;
item
.
SortNew
=
item
.
Sort
;
item
.
NameNew
=
item
.
Name
;
item
.
NameNew
=
item
.
Name
;
item
.
editsort
=
false
;
item
.
editsort
=
false
;
item
.
editname
=
false
;
item
.
editname
=
false
;
})
})
this
.
tableData
=
pageData
;
this
.
tableData
=
pageData
;
}
}
})
})
},
},
getTree
()
{
getTree
()
{
let
msg1
=
{
let
msg1
=
{
Id
:
0
,
Id
:
0
,
Name
:
''
,
Name
:
''
,
Tier
:
0
,
Tier
:
0
,
ParentId
:
0
,
ParentId
:
0
,
Enabled
:
1
,
Enabled
:
1
,
IsShow
:
1
,
IsShow
:
1
,
}
}
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
this
.
apipost
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
this
.
fenleiData
=
pageData
;
}
}
})
})
},
},
getRule
()
{
getRule
()
{
let
msg1
=
{
let
msg1
=
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
999
,
pageSize
:
999
,
RulesName
:
''
,
RulesName
:
''
,
}
}
this
.
apipost
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
this
.
apipost
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
ruleList
=
pageData
;
this
.
ruleList
=
pageData
;
}
}
})
})
},
},
changeSupplier
(
val
)
{},
changeSupplier
(
val
)
{},
getSupplierList
()
{
getSupplierList
()
{
this
.
apipost
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
apipost
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
...
@@ -810,131 +741,147 @@ export default {
...
@@ -810,131 +741,147 @@ export default {
}
}
});
});
},
},
getSort
(
val
){
//列表的升序降序
getSort
(
val
)
{
//列表的升序降序
if
(
val
.
prop
==
'Id'
)
{
if
(
val
.
prop
==
'Id'
)
{
if
(
val
.
order
==
'ascending'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
1
this
.
msg
.
OrderBy
=
1
}
else
if
(
val
.
order
==
'descending'
)
{
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
2
this
.
msg
.
OrderBy
=
2
}
else
{
}
else
{
this
.
msg
.
OrderBy
=
0
this
.
msg
.
OrderBy
=
0
}
}
}
else
if
(
val
.
prop
==
'address'
)
{
}
else
if
(
val
.
prop
==
'address'
)
{
if
(
val
.
order
==
'ascending'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
3
this
.
msg
.
OrderBy
=
3
}
else
if
(
val
.
order
==
'descending'
)
{
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
4
this
.
msg
.
OrderBy
=
4
}
else
{
}
else
{
this
.
msg
.
OrderBy
=
0
this
.
msg
.
OrderBy
=
0
}
}
}
else
if
(
val
.
prop
==
'SellingPrice'
)
{
}
else
if
(
val
.
prop
==
'SellingPrice'
)
{
if
(
val
.
order
==
'ascending'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
5
this
.
msg
.
OrderBy
=
5
}
else
if
(
val
.
order
==
'descending'
)
{
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
6
this
.
msg
.
OrderBy
=
6
}
else
{
}
else
{
this
.
msg
.
OrderBy
=
0
this
.
msg
.
OrderBy
=
0
}
}
}
else
if
(
val
.
prop
==
'InventoryNum'
)
{
}
else
if
(
val
.
prop
==
'InventoryNum'
)
{
if
(
val
.
order
==
'ascending'
)
{
if
(
val
.
order
==
'ascending'
)
{
this
.
msg
.
OrderBy
=
7
this
.
msg
.
OrderBy
=
7
}
else
if
(
val
.
order
==
'descending'
)
{
}
else
if
(
val
.
order
==
'descending'
)
{
this
.
msg
.
OrderBy
=
8
this
.
msg
.
OrderBy
=
8
}
else
{
}
else
{
this
.
msg
.
OrderBy
=
0
this
.
msg
.
OrderBy
=
0
}
}
}
}
this
.
getList
()
this
.
getList
()
},
},
//新窗口跳转
//新窗口跳转
goGoodsEdit
(
Id
)
{
goGoodsEdit
(
Id
)
{
let
routeData
=
this
.
$router
.
resolve
({
let
routeData
=
this
.
$router
.
resolve
({
name
:
'goodsListEdit'
,
name
:
'goodsListEdit'
,
query
:
{
query
:
{
GoodsId
:
Id
,
GoodsId
:
Id
,
hpState
:
this
.
hpState
,
hpState
:
this
.
hpState
,
FxState
:
this
.
FxState
FxState
:
this
.
FxState
}
}
});
});
window
.
open
(
routeData
.
href
,
"_blank"
);
window
.
open
(
routeData
.
href
,
"_blank"
);
}
}
},
},
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.plxg
.spmy
.el-form-item__label
{
.plxg
.spmy
.el-form-item__label
{
padding-right
:
26px
;
padding-right
:
26px
;
}
}
.yfradio
{
.yfradio
{
display
:
block
;
display
:
block
;
padding
:
10px
;
padding
:
10px
;
}
}
.plxg
.batch-div-active
{
.plxg
.batch-div-active
{
background-color
:
#e2e2e2
;
background-color
:
#e2e2e2
;
}
}
.plxg
.batch-box-left
div
{
.plxg
.batch-box-left
div
{
padding
:
5px
0
;
padding
:
5px
0
;
margin
:
5px
0
;
margin
:
5px
0
;
cursor
:
pointer
;
cursor
:
pointer
;
-webkit-border-radius
:
5px
;
-webkit-border-radius
:
5px
;
-moz-border-radius
:
5px
;
-moz-border-radius
:
5px
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.plxg
.batch-box-left
{
.plxg
.batch-box-left
{
width
:
120px
;
width
:
120px
;
border-right
:
1px
solid
#e2e2e2
;
border-right
:
1px
solid
#e2e2e2
;
padding
:
0
20px
;
padding
:
0
20px
;
}
}
.plxg
.el-dialog__body
{
padding-top
:
10px
!important
;
.plxg
.el-dialog__body
{
}
padding-top
:
10px
!important
;
.plxg
.absoSpan
{
}
.plxg
.absoSpan
{
position
:
absolute
;
position
:
absolute
;
top
:
22px
;
top
:
22px
;
left
:
100px
;
left
:
100px
;
}
}
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
.app-add-cat
.el-checkbox-group
{
}
font-size
:
14px
!important
;
.app-add-cat
.el-checkbox
{
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
margin-right
:
0
;
}
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
.app-add-cat
.el-dialog__body
{
}
padding
:
10px
20px
!important
;
.app-add-cat
.tag-box
.tag-item
{
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
margin-right
:
5px
;
}
}
.app-add-cat
.tag-box
{
.app-add-cat
.tag-box
{
margin
:
20px
0
;
margin
:
20px
0
;
}
}
.app-add-cat
.app-goods-cat-list
.active
{
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
background
:
#FAFAFA
;
}
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
cursor
:
pointer
;
padding
:
5px
10px
;
padding
:
5px
10px
;
}
}
.app-add-cat
.app-goods-cat-list
{
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
border-radius
:
5px
;
margin-top
:
-5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
padding
:
10px
0
;
overflow
:
scroll
;
overflow
:
scroll
;
height
:
400px
;
height
:
400px
;
}
}
.goodsList
.vue-line-clamp
{
.goodsList
.vue-line-clamp
{
display
:
block
;
display
:
block
;
display
:
-webkit-box
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
}
}
.goodsList
.content
{
.goodsList
.content
{
background
:
#fff
;
background
:
#fff
;
margin-top
:
10px
;
margin-top
:
10px
;
padding
:
20px
;
padding
:
20px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
</
style
>
</
style
>
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