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
840fda65
Commit
840fda65
authored
Mar 10, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
90da70f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1163 additions
and
685 deletions
+1163
-685
edit.vue
src/components/coffeeManage/edit.vue
+19
-20
index.vue
src/components/coffeeManage/index.vue
+1084
-661
index.js
src/plug/index.js
+60
-4
No files found.
src/components/coffeeManage/edit.vue
View file @
840fda65
...
...
@@ -1334,8 +1334,8 @@
if
(
this
.
$route
.
query
.
FxState
)
{
this
.
FxState
=
this
.
$route
.
query
.
FxState
;
}
this
.
currentUserInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
);
this
.
addMsg
.
IsKorea
=
this
.
currentUserInfo
.
IsKorea
;
//
this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
this
.
addMsg
.
IsKorea
=
0
;
this
.
getService
();
this
.
getRule
();
this
.
getSpeciList
();
...
...
@@ -1374,7 +1374,7 @@
});
}
let
CategoryIds
=
arr
.
join
(
","
);
this
.
api
post
(
this
.
i_
post
(
"/api/user/GetHpDistributorGoodsInfo"
,
{
CategoryIds
:
CategoryIds
,
CostPrice
:
"10"
...
...
@@ -1444,7 +1444,7 @@
Name
:
""
,
Enabled
:
1
};
this
.
api
post
(
"/api/user/GetMemberGradeList"
,
msg
,
res
=>
{
this
.
i_
post
(
"/api/user/GetMemberGradeList"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
...
...
@@ -1841,7 +1841,7 @@
});
},
Save
(
formName
)
{
this
.
addMsg
.
IsKorea
=
this
.
currentUserInfo
.
IsKorea
;
this
.
addMsg
.
IsKorea
=
0
;
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
let
content
=
this
.
$refs
.
ue
.
getUEContent
();
...
...
@@ -1928,8 +1928,8 @@
this
.
addMsg
.
MarketingLogo
.
wordsBack
=
''
;
}
this
.
addMsg
.
EmpId
=
this
.
currentUserInfo
.
EmpId
this
.
api
post
(
"/api/product/SetProductGoodsInfo"
,
this
.
addMsg
,
res
=>
{
this
.
addMsg
.
EmpId
=
0
this
.
i_
post
(
"/api/product/SetProductGoodsInfo"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
back
()
...
...
@@ -1950,7 +1950,7 @@
Id
:
0
,
Content
:
""
};
this
.
api
post
(
"/api/product/GetProductSpecificationPageList"
,
msg
,
res
=>
{
this
.
i_
post
(
"/api/product/GetProductSpecificationPageList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
speciList
=
pageData
;
...
...
@@ -2131,7 +2131,7 @@
IsShow
:
1
,
CategoryPageType
:
this
.
addMsg
.
GoodsPageType
};
this
.
api
post
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
this
.
i_
post
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
...
...
@@ -2153,7 +2153,7 @@
},
getData
()
{
this
.
api
post
(
this
.
i_
post
(
"/api/product/GetProductGoodsInfo"
,
{
GoodsId
:
this
.
GoodsId
},
...
...
@@ -2234,7 +2234,7 @@
CategoryIds
:
CategoryIds
,
CostPrice
:
this
.
addMsg
.
CostPrice
};
this
.
api
post
(
"/api/user/GetHpGoodsSuggestPrice"
,
msg
,
res
=>
{
this
.
i_
post
(
"/api/user/GetHpGoodsSuggestPrice"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
SuggestPriceInfo
=
res
.
data
.
data
;
}
...
...
@@ -2247,7 +2247,7 @@
pageSize
:
999
,
RulesName
:
""
};
this
.
api
post
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
this
.
i_
post
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
ruleList
=
pageData
;
...
...
@@ -2261,7 +2261,7 @@
Name
:
""
,
IsDefault
:
0
};
this
.
api
post
(
"/api/product/GetProductServicePageList"
,
msg
,
res
=>
{
this
.
i_
post
(
"/api/product/GetProductServicePageList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
...
...
@@ -2271,7 +2271,7 @@
},
getDistributor
()
{
this
.
loading
=
true
;
this
.
api
post
(
"/api/user/GetDistributorBasicsInfo"
,
{},
res
=>
{
this
.
i_
post
(
"/api/user/GetDistributorBasicsInfo"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
butorInt
=
res
.
data
.
data
.
DistributorTier
;
...
...
@@ -2293,7 +2293,7 @@
Name
:
""
,
Enabled
:
1
};
this
.
api
post
(
"/api/user/GetDistributorGradeDropdownList"
,
msg
,
res
=>
{
this
.
i_
post
(
"/api/user/GetDistributorGradeDropdownList"
,
msg
,
res
=>
{
this
.
DropdownList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
data
));
let
msg
=
{
Grade
:
0
,
...
...
@@ -2361,7 +2361,7 @@
},
changeSupplier
(
val
)
{},
getSupplierList
()
{
this
.
api
post
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
i_
post
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
options
=
res
.
data
.
data
;
...
...
@@ -2369,7 +2369,7 @@
});
},
getFXDGradeList
()
{
this
.
api
post
(
"/api/user/GetFXDistributorGradeList"
,
{
this
.
i_
post
(
"/api/user/GetFXDistributorGradeList"
,
{
GradeName
:
''
},
res
=>
{
this
.
loading
=
false
;
...
...
@@ -2392,11 +2392,10 @@
},
getFXDGradeList2
()
{
this
.
api
post
(
"/api/user/GetFXDistributorGradeList"
,
{
this
.
i_
post
(
"/api/user/GetFXDistributorGradeList"
,
{
GradeName
:
''
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
data
!=
null
)
{
res
.
data
.
data
.
forEach
(
x
=>
{
if
(
x
.
Id
==
this
.
addMsg
.
PresentFXGrade
)
{
...
...
@@ -2434,7 +2433,7 @@
},
//获取上架版面下拉
getCateList
()
{
this
.
api
post
(
"/api/Product/GoodsPageTypeEnumList"
,
{},
res
=>
{
this
.
i_
post
(
"/api/Product/GoodsPageTypeEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
My_cateList
=
res
.
data
.
data
;
}
else
{
...
...
src/components/coffeeManage/index.vue
View file @
840fda65
...
...
@@ -20,56 +20,107 @@
</el-tabs>
</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>
"
type=
"danger"
style=
"margin-right: 10px"
size=
"small"
>
清除分类
</el-button>
-->
<span>
添加时间:
</span>
<el-date-picker
v-model=
"dateList"
@
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
v-model=
"dateList"
@
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>
<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"
placeholder=
"请输入名称搜索"
v-model=
"msg.Name"
@
clear=
"(msg.pageIndex = 1), getList()"
size=
"small"
clearable
>
<el-input
@
keyup
.
enter
.
native=
"(msg.pageIndex = 1), getList()"
style=
"display: inline-block; width: 225px; height: 30px"
placeholder=
"请输入名称搜索"
v-model=
"msg.Name"
@
clear=
"(msg.pageIndex = 1), getList()"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"(msg.pageIndex = 1), getList()"
class=
"el-icon-search"
style=
"
<span
@
click=
"(msg.pageIndex = 1), getList()"
class=
"el-icon-search"
style=
"
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
"
></span>
</div>
<div
class=
"searchInput"
style=
"width: 250px"
>
<el-input
@
keyup
.
enter
.
native=
"(msg.pageIndex = 1), getList()"
style=
"display: inline-block; width: 225px; height: 30px"
placeholder=
"请输入ID搜索"
v-model=
"msg.Id"
@
clear=
"(msg.pageIndex = 1), getList()"
size=
"small"
clearable
>
<el-input
@
keyup
.
enter
.
native=
"(msg.pageIndex = 1), getList()"
style=
"display: inline-block; width: 225px; height: 30px"
placeholder=
"请输入ID搜索"
v-model=
"msg.Id"
@
clear=
"(msg.pageIndex = 1), getList()"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"(msg.pageIndex = 1), getList()"
class=
"el-icon-search"
style=
"
<span
@
click=
"(msg.pageIndex = 1), getList()"
class=
"el-icon-search"
style=
"
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"
></span>
"
></span>
</div>
<span
@
click=
"Clearconditions"
v-if=
"
<span
@
click=
"Clearconditions"
v-if=
"
msg.Name != '' ||
msg.CategoryIds != '' ||
(dateList && dateList.length > 0)
"
class=
"blue point"
>
清空筛选条件
</span>
msg.CategoryIds != '' ||
(dateList && dateList.length > 0)
"
class=
"blue point"
>
清空筛选条件
</span
>
</div>
<div
style=
"margin-top: 15px"
>
<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(6)"
style=
"margin-left: 10px"
size=
"mini"
>
删除
</el-button>
<el-button
@
click=
"plsetBtn"
style=
"margin-left: 10px"
size=
"mini"
v-if=
"currentUserInfo.IsKorea == 0"
>
批量设置
<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(6)"
style=
"margin-left: 10px"
size=
"mini"
>
删除
</el-button
>
<el-button
@
click=
"plsetBtn"
style=
"margin-left: 10px"
size=
"mini"
v-if=
"currentUserInfo.IsKorea == 0"
>
批量设置
</el-button>
</div>
<el-table
:data=
"tableData"
v-loading=
"loading"
border
sortable=
"custom"
@
sort-change=
"getSort"
@
selection-change=
"tableSelect"
style=
"width: 100%; margin: 20px 0"
>
<el-table
:data=
"tableData"
v-loading=
"loading"
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
prop=
"Id"
width=
"80"
sortable
label=
"ID"
>
</el-table-column>
...
...
@@ -77,96 +128,181 @@
<template
slot-scope=
"scope"
>
<template
v-if=
"!scope.row.editsort"
>
<span>
{{
scope
.
row
.
Sort
}}
</span>
<img
@
click=
"
<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=
""
/>
"
style=
"width: 15px; height: 15px; margin-left: 7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
/>
</
template
>
<
template
v-else
>
<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=
"Edit(scope.row, 1)"
class=
"el-icon-success"
style=
"color: #67c23a"
></span>
<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=
"Edit(scope.row, 1)"
class=
"el-icon-success"
style=
"color: #67c23a"
></span>
</
template
>
</template>
</el-table-column>
<el-table-column
prop=
"Remark"
label=
"分类"
>
<
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"
>
<div
slot=
"content"
>
<span
v-for=
"(item, index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
<span
v-for=
"(item, index) in scope.row.CategoryList"
:key=
"index"
>
{{
item
.
CategoryName
}}
</span>
</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>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"300"
label=
"商品名称"
>
<
template
slot-scope=
"scope"
>
<div
flex=
"box:first"
>
<el-image
title=
"点击查看大图"
style=
"width: 50px; height: 50px; margin-right: 1px"
:src=
"scope.row.CoverImage"
:preview-src-list=
"scope.row.CarouselImageList"
>
<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"
>
<div
flex=
"cross:top"
style=
"display: inline-flex"
>
<div
flex=
"dir:left"
>
<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"
>
<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"
>
<span>
{{
scope
.
row
.
Name
}}
</span>
</div>
</el-tooltip>
<img
@
click=
"
<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=
""
/>
"
style=
"width: 15px; height: 15px; margin-left: 7px"
src=
"../../assets/img/userman/edit1.png"
alt=
""
/>
</div>
</div>
</
template
>
<
template
v-else
>
<el-input
v-model=
"scope.row.NameNew"
size=
"small"
style=
"display: inline-block; width: 150px"
>
<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=
"
<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; position: relative; top: 9px"
></span>
"
></span>
<span
@
click=
"Edit(scope.row, 2)"
class=
"el-icon-success"
style=
"color: #67c23a; position: relative; top: 9px"
></span>
</
template
>
</div>
<div
flex=
"dir:left"
style=
"margin-top: 5px; color: #f56c6c; font-size: 12px"
v-if=
"scope.row.Remark"
>
<div
flex=
"dir:left"
style=
"margin-top: 5px; color: #f56c6c; font-size: 12px"
v-if=
"scope.row.Remark"
>
<div
style=
"width: 38px"
>
备注:
</div>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Remark"
placement=
"top"
>
<div
class=
"vue-line-clamp"
style=
"
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.Remark"
placement=
"top"
>
<div
class=
"vue-line-clamp"
style=
"
word-break: break-all;
-webkit-line-clamp: 2;
width: 90%;
margin-left: 0;
"
>
"
>
<span>
{{ scope.row.Remark }}
</span>
</div>
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column
prop=
"SellingPrice"
width=
"100"
sortable
label=
"售价"
v-if=
"currentUserInfo.IsKorea == 0"
>
<el-table-column
prop=
"SellingPrice"
width=
"100"
sortable
label=
"售价"
v-if=
"currentUserInfo.IsKorea == 0"
>
</el-table-column>
<el-table-column
prop=
"InventoryNum"
width=
"100"
sortable
label=
"库存"
v-if=
"currentUserInfo.IsKorea == 0"
>
<el-table-column
prop=
"InventoryNum"
width=
"100"
sortable
label=
"库存"
v-if=
"currentUserInfo.IsKorea == 0"
>
<
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>
</
template
>
</el-table-column>
<el-table-column
width=
"120"
v-if=
"currentUserInfo.IsKorea == 0"
>
<
template
slot=
"header"
>
已出售量
<el-tooltip
effect=
"dark"
content=
"已出售量=实际销量+虚拟销量,按实际销量排序"
placement=
"top"
>
<el-tooltip
effect=
"dark"
content=
"已出售量=实际销量+虚拟销量,按实际销量排序"
placement=
"top"
>
<i
class=
"el-icon-info"
></i>
</el-tooltip>
</
template
>
...
...
@@ -174,10 +310,20 @@
<span>
{{
scope
.
row
.
GoodsBuyNum
}}
+
{{
scope
.
row
.
SalesNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"UpdateDate"
width=
"110"
label=
"是否加入快速购买"
v-if=
"currentUserInfo.IsKorea == 0"
>
<el-table-column
prop=
"UpdateDate"
width=
"110"
label=
"是否加入快速购买"
v-if=
"currentUserInfo.IsKorea == 0"
>
<
template
slot-scope=
"scope"
>
<el-switch
@
change=
"Edit(scope.row, 10)"
v-model=
"scope.row.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
<el-switch
@
change=
"Edit(scope.row, 10)"
v-model=
"scope.row.IsQuickBuy"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</
template
>
</el-table-column>
...
...
@@ -185,85 +331,164 @@
</el-table-column>
<el-table-column
prop=
"UpdateDate"
width=
"100"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<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 == 1"
type=
"success"
>
销售中
</el-tag
>
<el-tag
v-if=
"scope.row.GoodsStatus == 2"
type=
"warning"
>
下架中
</el-tag
>
</
template
>
</el-table-column>
<el-table-column
prop=
"RetailStore"
width=
"100"
label=
"分销商品"
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-if=
"scope.row.SourceGoodsId > 0"
:value=
"scope.row.SourceGoodsId > 0"
disabled
></el-checkbox>
<el-checkbox
v-if=
"scope.row.SourceGoodsId > 0"
:value=
"scope.row.SourceGoodsId > 0"
disabled
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"RetailStore"
width=
"100"
label=
"是否分销"
>
<
template
slot-scope=
"scope"
>
<el-checkbox
v-if=
"scope.row.RetailStore == 1"
:value=
"scope.row.RetailStore == 1"
disabled
></el-checkbox>
<el-checkbox
v-if=
"scope.row.RetailStore == 1"
:value=
"scope.row.RetailStore == 1"
disabled
></el-checkbox>
</
template
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"250"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"currentUserInfo.TenantId == 1 && currentUserInfo.MallBaseId ==1 && (currentUserInfo.EmpId == 0 || currentUserInfo.IsOtherUpdateGoods ==1 || currentUserInfo.EmpId==scope.row.CreateBy)"
>
<img
@
click=
"goGoodsEdit(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=
""
>
v-if=
"
currentUserInfo.TenantId == 1 &&
currentUserInfo.MallBaseId == 1 &&
(currentUserInfo.EmpId == 0 ||
currentUserInfo.IsOtherUpdateGoods == 1 ||
currentUserInfo.EmpId == scope.row.CreateBy)
"
>
<img
@
click=
"goGoodsEdit(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=
""
/>
</span>
<span
v-if=
"currentUserInfo.TenantId != 1 && currentUserInfo.MallBaseId !=1"
>
<img
@
click=
"goGoodsEdit(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=
""
>
<span
v-if=
"
currentUserInfo.TenantId != 1 && currentUserInfo.MallBaseId != 1
"
>
<img
@
click=
"goGoodsEdit(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=
""
/>
</span>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align: right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
<el-pagination
style=
"text-align: right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
</el-pagination>
</div>
<!-- 选择分类 -->
<el-dialog
custom-class=
"app-add-cat"
title=
"选择分类"
:visible
.
sync=
"flDig"
width=
"1100px"
>
<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"
>
<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>
<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"
>
<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"
>
<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>
<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"
>
<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"
>
<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>
...
...
@@ -277,75 +502,159 @@
</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>
<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>
<el-button
@
click=
"chooseFl"
size=
"small"
type=
"primary"
>
确 定
</el-button
>
</span>
</el-dialog>
<!-- 批量修改 -->
<el-dialog
custom-class=
"plxg"
title=
"批量修改"
:visible
.
sync=
"plDig"
width=
"960px"
>
<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
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
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
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
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
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
flex=
"main:center"
@
click=
"ClearSelect(12)"
:class=
"plszMsg.Type == 12 ? 'batch-div-active' : ''"
>
供应商
</div>
<div
flex=
"main:center"
@
click=
"ClearSelect(13)"
:class=
"plszMsg.Type == 13 ? 'batch-div-active' : ''"
>
<div
flex=
"main:center"
@
click=
"ClearSelect(13)"
:class=
"plszMsg.Type == 13 ? '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
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 = 0), (ruleSelect = {})"
closable
>
{{ ruleSelect.RulesName }}
</el-tag>
<el-button
@
click=
"chooseyfDig = true"
style=
"margin-left: 10px"
size=
"small"
>
选择运费
</el-button>
<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-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-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
@
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
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-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>
<
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"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top"
style=
"position: absolute; left: -10px; top: 12px"
>
<div
slot=
"content"
>
用户购物赠送的积分, 如果不填写或填写0,则默认为不赠送积分
<br
/>
如果为百分比则为按成交价格的比例计算积分
<br
/>
...
...
@@ -356,57 +665,138 @@
</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-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=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"1"
>
百分比
</el-radio>
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"2"
>
固定值
</el-radio
>
<el-radio
v-model=
"plszMsg.IntegralPresentType"
:label=
"1"
>
百分比
</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"
>
<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"
>
<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=
"2"
>
固定值
</el-radio>
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"1"
>
百分比
</el-radio>
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"2"
>
固定值
</el-radio
>
<el-radio
v-model=
"plszMsg.PointsDeductionType"
:label=
"1"
>
百分比
</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-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-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"
>
<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
v-model=
"plszMsg.IsGoodsNegotiable"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"0"
>
</el-switch>
</el-form-item>
<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"
placeholder=
"请选择"
@
change=
"changeSupplier"
>
<el-option
v-for=
"item in options"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
<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"
placeholder=
"请选择"
@
change=
"changeSupplier"
>
<el-option
v-for=
"item in options"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type == 13"
label-width=
"160px"
label=
"是否加入分销平台"
>
<el-switch
v-model=
"plszMsg.RetailStore"
active-text=
"是"
:active-value=
"2"
inactive-text=
"否"
:inactive-value=
"1"
>
<el-form-item
class=
"spmy"
v-if=
"plszMsg.Type == 13"
label-width=
"160px"
label=
"是否加入分销平台"
>
<el-switch
v-model=
"plszMsg.RetailStore"
active-text=
"是"
:active-value=
"2"
inactive-text=
"否"
:inactive-value=
"1"
>
</el-switch>
</el-form-item>
</el-form>
...
...
@@ -414,588 +804,621 @@
</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>
<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%"
>
<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
@
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=
"
<el-button
size=
"small"
@
click=
"
(chooseyfDig = false), (ruleSelect = {}), (plszMsg.FreightId = 0)
"
>
取 消
</el-button>
<el-button
size=
"small"
@
click=
"chooseyfDig = false"
type=
"primary"
>
确 定
</el-button>
"
>
取 消
</el-button
>
<el-button
size=
"small"
@
click=
"chooseyfDig = false"
type=
"primary"
>
确 定
</el-button
>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
name
:
"quickBuy"
,
data
()
{
return
{
chooseyfDig
:
false
,
plDig
:
false
,
flDig
:
false
,
val
:
""
,
dateList
:
[],
activeName
:
"first"
,
editState
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
""
,
GoodsStatus
:
0
,
IsSelectSellOut
:
0
,
CategoryIds
:
""
,
Id
:
""
,
StartTime
:
""
,
EndTime
:
""
,
OrderBy
:
0
,
Q_GoodsEduType
:
1
},
total
:
0
,
tableData
:
[],
loading
:
false
,
options
:
[],
addMsg
:
{
Id
:
0
,
Sort
:
""
,
Name
:
""
,
IsDefault
:
1
,
Remark
:
""
,
UpdateType
:
1
,
},
rules
:
{
CategoryIdNew
:
[{
export
default
{
name
:
"quickBuy"
,
data
()
{
return
{
chooseyfDig
:
false
,
plDig
:
false
,
flDig
:
false
,
val
:
""
,
dateList
:
[],
activeName
:
"first"
,
editState
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
""
,
GoodsStatus
:
0
,
IsSelectSellOut
:
0
,
CategoryIds
:
""
,
Id
:
""
,
StartTime
:
""
,
EndTime
:
""
,
OrderBy
:
0
,
Q_GoodsEduType
:
1
},
total
:
0
,
tableData
:
[],
loading
:
false
,
options
:
[],
addMsg
:
{
Id
:
0
,
Sort
:
""
,
Name
:
""
,
IsDefault
:
1
,
Remark
:
""
,
UpdateType
:
1
},
rules
:
{
CategoryIdNew
:
[
{
required
:
true
,
message
:
"分类不能为空"
,
trigger
:
"change"
,
},
],
Sort
:
[{
trigger
:
"change"
}
],
Sort
:
[
{
required
:
true
,
message
:
"请输入排序"
,
trigger
:
"blur"
,
},
],
},
fenleiData
:
[],
checkList
:
[],
childList2
:
[],
childList3
:
[],
GoodsIds
:
[],
plszMsg
:
{
GoodsIds
:
""
,
Type
:
7
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
""
,
},
ruleList
:
[],
ruleSelect
:
{},
keepGoodsIds
:
""
,
BuyGoodsNumState
:
true
,
BuyOrderNumState
:
true
,
hpState
:
0
,
FxState
:
0
,
currentUserInfo
:
{},
//当前用户
};
},
created
()
{
this
.
currentUserInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
);
this
.
getList
();
this
.
getTree
();
this
.
getRule
();
this
.
getHpState
();
this
.
getFxState
();
this
.
getSupplierList
();
//获取供应商
},
methods
:
{
//获取是否开启和平返佣
getHpState
()
{
this
.
apipost
(
"/api/user/GetHpDistributorIsEnabled"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
hpState
=
res
.
data
.
data
;
}
});
},
//是否开启粉象返佣
getFxState
()
{
this
.
apipost
(
"/api/user/GetIsEnableFXDistributorGrade"
,
{},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
FxState
=
res
.
data
.
data
;
trigger
:
"blur"
}
});
]
},
goodChange
(
val
,
num
)
{
if
(
!
val
)
{
if
(
num
==
1
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
0
;
}
else
if
(
num
==
2
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
0
;
}
}
fenleiData
:
[],
checkList
:
[],
childList2
:
[],
childList3
:
[],
GoodsIds
:
[],
plszMsg
:
{
GoodsIds
:
""
,
Type
:
7
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
""
},
Export
()
{
let
msg
=
this
.
msg
;
if
(
msg
.
Id
==
""
)
{
msg
.
Id
=
0
;
ruleList
:
[],
ruleSelect
:
{},
keepGoodsIds
:
""
,
BuyGoodsNumState
:
true
,
BuyOrderNumState
:
true
,
hpState
:
0
,
FxState
:
0
,
currentUserInfo
:
{}
//当前用户
};
},
created
()
{
// this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
},
methods
:
{
//获取是否开启和平返佣
getHpState
()
{
this
.
i_post
(
"/api/user/GetHpDistributorIsEnabled"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
hpState
=
res
.
data
.
data
;
}
msg
=
JSON
.
parse
(
JSON
.
stringify
(
msg
));
msg
.
pageSize
=
999
;
this
.
GetLocalFile
(
"/api/product/GetProductGoodsListToExcel"
,
msg
,
"商品列表.xls"
);
},
plsetOk
()
{
if
(
this
.
plszMsg
.
Type
==
7
)
{
// if(this.plszMsg.FreightId==0){
// this.Error("请选择运费规则");
// return;
// }
});
},
//是否开启粉象返佣
getFxState
()
{
this
.
i_post
(
"/api/user/GetIsEnableFXDistributorGrade"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
FxState
=
res
.
data
.
data
;
}
if
(
this
.
plszMsg
.
Type
==
8
)
{
if
(
this
.
plszMsg
.
BuyGoodsNumState
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
-
1
;
}
if
(
this
.
plszMsg
.
BuyOrderNumState
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
-
1
;
}
});
},
goodChange
(
val
,
num
)
{
if
(
!
val
)
{
if
(
num
==
1
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
0
;
}
else
if
(
num
==
2
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
0
;
}
let
mall_userInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
);
if
(
mall_userInfo
.
TenantId
==
1
&&
mall_userInfo
.
MallBaseId
==
1
)
{
if
(
this
.
plszMsg
.
SupplierId
==
""
&&
this
.
plszMsg
.
Type
!==
13
)
{
this
.
Error
(
"请选择供应商!"
);
return
;
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
}
}
else
{
if
(
this
.
plszMsg
.
SupplierId
==
""
)
{
this
.
plszMsg
.
SupplierId
=
0
;
this
.
commonSet
(
this
.
plszMsg
);
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
}
}
},
Export
()
{
let
msg
=
this
.
msg
;
if
(
msg
.
Id
==
""
)
{
msg
.
Id
=
0
;
}
msg
=
JSON
.
parse
(
JSON
.
stringify
(
msg
));
msg
.
pageSize
=
999
;
this
.
GetLocalFile
(
"/api/product/GetProductGoodsListToExcel"
,
msg
,
"商品列表.xls"
);
},
plsetOk
()
{
if
(
this
.
plszMsg
.
Type
==
7
)
{
// if(this.plszMsg.FreightId==0){
// this.Error("请选择运费规则");
// return;
// }
}
if
(
this
.
plszMsg
.
Type
==
8
)
{
if
(
this
.
plszMsg
.
BuyGoodsNumState
)
{
this
.
plszMsg
.
LimitBuyGoodsNum
=
-
1
;
}
},
plsetBtn
()
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的商品!"
);
return
;
if
(
this
.
plszMsg
.
BuyOrderNumState
)
{
this
.
plszMsg
.
LimitBuyOrderNum
=
-
1
;
}
let
idList
=
[];
this
.
GoodsIds
.
forEach
((
item
)
=>
{
idList
.
push
(
item
.
Id
);
});
this
.
keepGoodsIds
=
idList
.
join
(
","
);
this
.
plszMsg
.
GoodsIds
=
this
.
keepGoodsIds
;
this
.
plszMsg
.
SupplierId
=
""
;
this
.
plDig
=
true
;
},
ClearSelect
(
type
)
{
this
.
plszMsg
=
{
GoodsIds
:
this
.
keepGoodsIds
,
Type
:
type
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
""
,
};
},
YfSelect
(
val
)
{
this
.
ruleSelect
=
val
;
this
.
plszMsg
.
FreightId
=
val
.
ID
;
},
tableSelect
(
val
)
{
this
.
GoodsIds
=
val
;
},
// 上架 下架 删除
tableSet
(
num
)
{
if
(
this
.
GoodsIds
.
length
==
0
)
{
this
.
Error
(
"请先勾选要设置的商品!"
);
}
let
mall_userInfo
=
JSON
.
parse
(
localStorage
.
mall_userInfo
);
if
(
mall_userInfo
.
TenantId
==
1
&&
mall_userInfo
.
MallBaseId
==
1
)
{
if
(
this
.
plszMsg
.
SupplierId
==
""
&&
this
.
plszMsg
.
Type
!==
13
)
{
this
.
Error
(
"请选择供应商!"
);
return
;
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
}
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
=
"批量上架,是否继续"
;
}
else
{
if
(
this
.
plszMsg
.
SupplierId
==
""
)
{
this
.
plszMsg
.
SupplierId
=
0
;
this
.
commonSet
(
this
.
plszMsg
);
}
else
{
this
.
commonSet
(
this
.
plszMsg
);
}
if
(
num
==
5
)
{
str
=
"批量下架,是否继续"
;
}
},
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
.
plszMsg
.
SupplierId
=
""
;
this
.
plDig
=
true
;
},
ClearSelect
(
type
)
{
this
.
plszMsg
=
{
GoodsIds
:
this
.
keepGoodsIds
,
Type
:
type
,
FreightId
:
0
,
LimitBuyGoodsNum
:
-
1
,
LimitBuyOrderNum
:
-
1
,
IntegralPresent
:
0
,
IntegralPresentType
:
2
,
PointsDeduction
:
0
,
PointsDeductionType
:
2
,
IsMultipleDeduction
:
2
,
IsQuickBuy
:
2
,
IsGoodsNegotiable
:
2
,
SupplierId
:
""
};
},
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
.
i_post
(
"/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
.
pageIndex
=
1
;
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
);
}
if
(
num
==
6
)
{
str
=
"是否确认删除选中的商品?"
;
});
},
handleCheckChange
(
val
)
{},
Clearconditions
()
{
this
.
msg
.
Name
=
""
;
this
.
msg
.
CategoryIds
=
""
;
this
.
dateList
=
[];
this
.
checkList
=
[];
this
.
getList
();
},
handleClick
(
val
)
{
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
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
Delete
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
"是否删除?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
this
.
i_post
(
"/api/product/DelProcudtGoodsInfo"
,
{
GoodsId
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
})
.
catch
(()
=>
{});
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
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
=
""
;
}
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
if
(
msg
.
Id
==
""
)
{
msg
.
Id
=
0
;
}
msg
.
EmpId
=
0
;
msg
.
IsOtherUpdateGoods
=
0
;
this
.
loading
=
true
;
this
.
i_post
(
"/api/product/GetProductGoodsPageList"
,
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
pageData
.
forEach
(
item
=>
{
item
.
SortNew
=
item
.
Sort
;
item
.
NameNew
=
item
.
Name
;
item
.
editsort
=
false
;
item
.
editname
=
false
;
});
this
.
tableData
=
pageData
;
}
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
.
pageIndex
=
1
;
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
)
{
let
dataId
=
val
.
$attrs
.
dataId
;
if
(
dataId
==
0
)
{
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
0
;
});
},
getTree
()
{
let
msg1
=
{
Id
:
0
,
Name
:
""
,
Tier
:
0
,
ParentId
:
0
,
Enabled
:
1
,
IsShow
:
1
};
this
.
i_post
(
"/api/product/GetProductCategoryTreeList"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
;
this
.
fenleiData
=
pageData
;
}
if
(
dataId
==
1
)
{
this
.
msg
.
GoodsStatus
=
1
;
this
.
msg
.
IsSelectSellOut
=
0
;
});
},
getRule
()
{
let
msg1
=
{
pageIndex
:
1
,
pageSize
:
999
,
RulesName
:
""
};
this
.
i_post
(
"/api/MallBase/GetLogisticsRulesPage"
,
msg1
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
ruleList
=
pageData
;
}
if
(
dataId
==
2
)
{
this
.
msg
.
GoodsStatus
=
2
;
this
.
msg
.
IsSelectSellOut
=
0
;
});
},
changeSupplier
(
val
)
{},
getSupplierList
()
{
this
.
i_post
(
"/api/Supplier/GetSupplierAllList"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
options
=
res
.
data
.
data
;
}
if
(
dataId
==
3
)
{
this
.
msg
.
GoodsStatus
=
0
;
this
.
msg
.
IsSelectSellOut
=
1
;
});
},
getSort
(
val
)
{
//列表的升序降序
if
(
val
.
prop
==
"Id"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
1
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
2
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
Delete
(
item
)
{
let
that
=
this
;
that
.
$confirm
(
"是否删除?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
apipost
(
"/api/product/DelProcudtGoodsInfo"
,
{
GoodsId
:
item
.
Id
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
})
.
catch
(()
=>
{});
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
()
{
if
(
this
.
dateList
&&
this
.
dateList
.
length
>
0
)
{
this
.
msg
.
StartTime
=
this
.
dateList
[
0
];
this
.
msg
.
EndTime
=
this
.
dateList
[
1
];
}
else
if
(
val
.
prop
==
"address"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
3
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
4
;
}
else
{
this
.
msg
.
StartTime
=
""
;
this
.
msg
.
EndTime
=
""
;
this
.
msg
.
OrderBy
=
0
;
}
let
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
if
(
msg
.
Id
==
""
)
{
msg
.
Id
=
0
;
}
else
if
(
val
.
prop
==
"SellingPrice"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
5
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
6
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
msg
.
EmpId
=
this
.
currentUserInfo
.
EmpId
msg
.
IsOtherUpdateGoods
=
this
.
currentUserInfo
.
IsOtherUpdateGoods
this
.
loading
=
true
;
this
.
apipost
(
"/api/product/GetProductGoodsPageList"
,
msg
,
(
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
pageData
.
forEach
((
item
)
=>
{
item
.
SortNew
=
item
.
Sort
;
item
.
NameNew
=
item
.
Name
;
item
.
editsort
=
false
;
item
.
editname
=
false
;
});
this
.
tableData
=
pageData
;
}
});
},
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
;
}
});
},
changeSupplier
(
val
)
{},
getSupplierList
()
{
this
.
apipost
(
"/api/Supplier/GetSupplierAllList"
,
{},
(
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
options
=
res
.
data
.
data
;
}
});
},
getSort
(
val
)
{
//列表的升序降序
if
(
val
.
prop
==
"Id"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
1
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
2
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
}
else
if
(
val
.
prop
==
"address"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
3
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
4
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
}
else
if
(
val
.
prop
==
"SellingPrice"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
5
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
6
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
}
else
if
(
val
.
prop
==
"InventoryNum"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
7
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
8
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
}
else
if
(
val
.
prop
==
"InventoryNum"
)
{
if
(
val
.
order
==
"ascending"
)
{
this
.
msg
.
OrderBy
=
7
;
}
else
if
(
val
.
order
==
"descending"
)
{
this
.
msg
.
OrderBy
=
8
;
}
else
{
this
.
msg
.
OrderBy
=
0
;
}
this
.
getList
();
},
//新窗口跳转
goGoodsEdit
(
Id
)
{
this
.
$router
.
push
({
path
:
"/coffeeManage/edit"
,
query
:
{
GoodsId
:
Id
,
hpState
:
this
.
hpState
,
FxState
:
this
.
FxState
,
},
})
},
}
this
.
getList
();
},
};
//新窗口跳转
goGoodsEdit
(
Id
)
{
this
.
$router
.
push
({
path
:
"/coffeeManage/edit"
,
query
:
{
GoodsId
:
Id
,
hpState
:
this
.
hpState
,
FxState
:
this
.
FxState
}
});
}
},
mounted
()
{
let
that
=
this
window
.
addEventListener
(
"message"
,
function
(
messageEvent
)
{
let
data
=
messageEvent
.
data
;
console
.
log
(
"收到vue的数据:"
,
JSON
.
parse
(
data
));
window
.
localStorage
.
setItem
(
"iframeData"
,
data
);
that
.
getList
();
that
.
getTree
();
that
.
getRule
();
that
.
getHpState
();
that
.
getFxState
();
that
.
getSupplierList
();
//获取供应商
});
}
};
</
script
>
<
style
>
.plxg
.spmy
.el-form-item__label
{
padding-right
:
26px
;
}
.plxg
.spmy
.el-form-item__label
{
padding-right
:
26px
;
}
.yfradio
{
display
:
block
;
padding
:
10px
;
}
.yfradio
{
display
:
block
;
padding
:
10px
;
}
.plxg
.batch-div-active
{
background-color
:
#e2e2e2
;
}
.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
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
.batch-box-left
{
width
:
120px
;
border-right
:
1px
solid
#e2e2e2
;
padding
:
0
20px
;
}
.plxg
.el-dialog__body
{
padding-top
:
10px
!important
;
}
.plxg
.el-dialog__body
{
padding-top
:
10px
!important
;
}
.plxg
.absoSpan
{
position
:
absolute
;
top
:
22px
;
left
:
100px
;
}
.plxg
.absoSpan
{
position
:
absolute
;
top
:
22px
;
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
{
margin-right
:
0
;
}
.app-add-cat
.el-checkbox
{
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
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.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
.active
{
background
:
#fafafa
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.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
;
}
.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
{
padding
:
20px
;
}
.goodsList
.vue-line-clamp
{
display
:
block
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.goodsList
{
padding
:
20px
;
}
.goodsList
.content
{
background
:
#fff
;
margin-top
:
10px
;
box-sizing
:
border-box
;
}
.goodsList
.vue-line-clamp
{
display
:
block
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.goodsList
.el-checkbox__input.is-disabled.is-checked
.el-checkbox__inner
{
background-color
:
#409eff
;
border-color
:
#409eff
;
}
.goodsList
.content
{
background
:
#fff
;
margin-top
:
10px
;
box-sizing
:
border-box
;
}
.goodsList
.el-checkbox__input.is-disabled.is-checked
.el-checkbox__inner
{
background-color
:
#409eff
;
border-color
:
#409eff
;
}
</
style
>
src/plug/index.js
View file @
840fda65
...
...
@@ -54,10 +54,9 @@ export default {
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
let
domainUrl
=
"http://192.168.10.02:8088"
;
// let domainUrl = "https://mallapi.oytour.com";
let
javaUrl
=
'http://192.168.10.214:8018'
;
domainUrl
=
"https://localhost:5001"
let
vtUploadUrl
=
"http://192.168.10.214:8120"
;
let
vtViewUrl
=
"http://192.168.10.214:8130"
;
...
...
@@ -332,6 +331,8 @@ export default {
}
//HTTP提交数据
Vue
.
prototype
.
apipost
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
)
{
var
apiurl
=
this
.
domainManager
().
DomainUrl
+
cmd
;
var
postData
=
this
.
GetPostData
(
cmd
,
msg
,
""
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
...
...
@@ -373,7 +374,7 @@ export default {
var
TenantId
=
"0"
;
//商户Id
var
EmpId
=
0
;
//员工编号【员工登录时使用】
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
Token
;
token
=
this
.
getLocalStorage
().
Token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
MallBaseId
=
this
.
getLocalStorage
().
MallBaseId
;
TenantId
=
this
.
getLocalStorage
().
TenantId
;
...
...
@@ -575,6 +576,61 @@ export default {
query
:
queryObj
});
window
.
open
(
newUrl
.
href
,
'_blank'
);
},
// iframe-甲鹤 提交数据
Vue
.
prototype
.
i_post
=
function
(
cmd
,
msg
,
successCall
,
faildCall
,)
{
var
apiurl
=
this
.
domainManager
().
DomainUrl
+
cmd
;
var
postData
=
this
.
Get_i_Data
(
cmd
,
msg
,
""
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Referer-Viitto'
:
this
.
$route
.
path
}
})
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
this
.
$router
.
push
({
path
:
'/login'
});
}
else
if
(
res
.
resultCode
==
10005
)
{
this
.
$router
.
go
(
-
1
);
}
else
{
successCall
(
res
);
}
},
faildCall
)
}
Vue
.
prototype
.
Get_i_Data
=
function
(
cmd
,
msg
,
newCmd
)
{
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
timestamp
=
(
new
Date
()).
valueOf
();
let
apiData
=
JSON
.
parse
(
localStorage
.
getItem
(
'iframeData'
))
console
.
log
(
608
,
apiData
)
var
token
=
apiData
.
token
;
var
key
=
""
;
var
TenantId
=
"0"
;
//商户Id
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
cmdStr
=
""
;
if
(
newCmd
)
{
cmdStr
=
newCmd
;
}
var
postData
=
{
msg
:
msg
,
timestamp
:
timestamp
,
token
:
token
,
sign
:
md5Str
,
languageId
:
0
,
cmd
:
cmdStr
,
MallBaseId
:
5
,
TenantId
:
TenantId
,
EmpId
:
0
,
//员工编号【员工登录时使用】
SmallShopsId
:
0
,
MiniAppId
:
"wxbb033190e0ffa5db"
,
OpenId
:
"ow_7I5cKHQJeQlNJOKoeERRhe6SA"
,
UserId
:
21382
,
}
return
postData
}
}
}
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