Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
linshenxs-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈超
linshenxs-shop
Commits
de77daa2
Commit
de77daa2
authored
Jul 22, 2022
by
10_noah@other.ren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品管理 上架下架问题修改
parent
21b3b089
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
70 deletions
+76
-70
src/const/crud/mall/merchantMallgoods.js
+25
-22
src/views/businessGoods/goodsEdit/goods_edit.vue
+1
-1
src/views/businessGoods/index.vue
+50
-47
No files found.
src/const/crud/mall/merchantMallgoods.js
View file @
de77daa2
...
...
@@ -21,26 +21,28 @@ export const tableOption = {
"valueFormat"
:
'yyyy-MM-dd'
,
"format"
:
'yyyy-MM-dd'
,
},
{
"type"
:
"input"
,
"label"
:
"商品ID"
,
"prop"
:
"id"
,
span
:
12
,
"search"
:
true
,
showColumn
:
false
},
//
{
//
"type": "input",
//
"label": "商品ID",
//
"prop": "id",
//
span: 12,
//
"search": true,
//
showColumn: false
//
},
{
"type"
:
"input"
,
"label"
:
"商品ID"
,
"prop"
:
"goodsId"
,
span
:
12
,
"search"
:
true
,
"searchSpan"
:
9
,
},
{
"type"
:
"input"
,
"label"
:
"商品名称"
,
"prop"
:
"goodsName"
,
"search"
:
true
,
"searchSpan"
:
7
,
},
{
"listType"
:
'picture-img'
,
...
...
@@ -48,14 +50,14 @@ export const tableOption = {
"label"
:
"商品列表图"
,
"prop"
:
"goodsImage"
,
},
{
"type"
:
"select"
,
"label"
:
"商品分类"
,
"prop"
:
"classifyId"
,
"span"
:
12
,
showColumn
:
false
,
"dicUrl"
:
"/general/mallClassify/dropDownBox"
,
},
//
{
//
"type": "select",
//
"label": "商品分类",
//
"prop": "classifyId",
//
"span": 12,
// "showColumn"
: false,
//
"dicUrl": "/general/mallClassify/dropDownBox",
//
},
{
"type"
:
"input"
,
"label"
:
"商品分类"
,
...
...
@@ -78,10 +80,10 @@ export const tableOption = {
"type"
:
"select"
,
"label"
:
"状态"
,
"prop"
:
"state"
,
"showColumn"
:
false
,
"search"
:
true
,
"showColumn"
:
false
,
dicUrl
:
"/admin/merchantMallGoods/getMerchantStateOptions"
,
"searchSpan"
:
9
,
"dicUrl"
:
"/admin/merchantMallGoods/getMerchantStateOptions"
,
},
{
"type"
:
"input"
,
...
...
@@ -92,10 +94,11 @@ export const tableOption = {
"type"
:
"select"
,
"label"
:
"审核状态"
,
"prop"
:
"auditState"
,
"showColumn"
:
false
,
"search"
:
true
,
"s
howColumn"
:
false
,
dicUrl
:
"/admin/merchantMallGoods/getMerchantAuditStateOptions"
,
},
"s
earchSpan"
:
7
,
"dicUrl"
:
"/admin/merchantMallGoods/getMerchantAuditStateOptions"
,
},
{
"type"
:
"input"
,
"label"
:
"审核状态"
,
...
...
src/views/businessGoods/goodsEdit/goods_edit.vue
View file @
de77daa2
...
...
@@ -11,7 +11,7 @@
<el-form-item
label=
"商品名称"
prop=
"goodsName"
>
<el-input
v-model=
"form.goodsName"
placeholder=
"输入商品名称"
maxlength=
"
10
0"
maxlength=
"
5
0"
show-word-limit
style=
"width: 230px;"
></el-input>
</el-form-item>
...
...
src/views/businessGoods/index.vue
View file @
de77daa2
...
...
@@ -148,30 +148,32 @@
this
.
$message
.
error
(
'请选择项进行上架'
)
return
}
let
a
=
d
.
map
(
r
=>
{
return
r
.
stateName
}).
join
(
','
)
if
(
a
.
search
(
'审核中'
)
!=
-
1
){
this
.
$message
.
error
(
'只作用于商家下架的商品,已经上架正在审核'
)
return
;
}
else
if
(
a
.
search
(
'平台下架'
)
!=
-
1
){
this
.
$message
.
error
(
'只作用于商家下架的商品,平台下架商品。'
)
return
;
}
else
if
(
a
.
search
(
'有效'
)
!=
-
1
)
{
this
.
$message
.
error
(
'只作用于商家下架的商品,商品已经上架。'
)
return
;
}
else
{
let
ids
=
d
.
map
(
r
=>
{
return
r
.
id
}).
join
(
','
)
this
.
$confirm
(
'请确认是否上架已勾选的商品'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
isUpon
({
ids
:
ids
})
}).
then
(
data
=>
{
this
.
$message
.
success
(
'上架成功'
)
this
.
getList
(
this
.
page
)
})
for
(
let
j
=
0
;
j
<
d
.
length
;
j
++
){
let
obj
=
d
[
j
]
if
(
obj
.
state
==
1
){
this
.
$message
.
error
(
"商品ID:"
+
obj
.
goodsId
+
" 已上架"
)
return
;
}
if
(
obj
.
state
==
3
){
this
.
$message
.
error
(
"商品ID:"
+
obj
.
goodsId
+
" 被平台下架,请先进行修改"
)
return
;
}
if
(
obj
.
state
==
0
){
this
.
$message
.
error
(
"商品ID:"
+
obj
.
goodsId
+
" 审核中,请勿重复提交"
)
return
;
}
}
let
ids
=
d
.
map
(
r
=>
{
return
r
.
id
}).
join
(
','
)
this
.
$confirm
(
'请确认是否上架选中的商品?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
isUpon
({
ids
:
ids
})
}).
then
(
data
=>
{
this
.
$message
.
success
(
'上架成功'
)
this
.
getList
(
this
.
page
)
})
},
// 批量 下架
batchIsNotUpon
()
{
...
...
@@ -181,32 +183,33 @@
return
}
let
a
=
d
.
map
(
r
=>
{
return
r
.
stateName
}).
join
(
','
)
if
(
a
.
search
(
'有效'
)
!=
-
1
){
let
ids
=
d
.
map
(
r
=>
{
return
r
.
id
}).
join
(
','
)
this
.
$confirm
(
'商品正在审核,是否确认下架'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'error'
}).
then
(
function
()
{
return
isNotUpon
({
ids
:
ids
})
}).
then
(
data
=>
{
this
.
$message
.
success
(
'下架成功'
)
this
.
getList
(
this
.
page
)
})
}
else
if
(
a
.
search
(
'下架'
)
!=
-
1
){
this
.
$message
.
error
(
'可作用于上架,商品已经下架。'
)
return
;
}
else
if
(
a
.
search
(
'平台下架'
)
!=
-
1
){
this
.
$message
.
error
(
'可作用于上架,商品审核拒绝。'
)
return
;
}
else
if
(
a
.
search
(
'审核中'
)
!=
-
1
){
this
.
$message
.
error
(
'可作用于上架,商品正在审核。'
)
return
;
for
(
let
j
=
0
;
j
<
d
.
length
;
j
++
){
let
obj
=
d
[
j
]
if
(
obj
.
state
==
0
){
this
.
$message
.
error
(
"商品ID:"
+
obj
.
goodsId
+
" 审核中,不能下架"
)
return
;
}
if
(
obj
.
state
==
2
){
this
.
$message
.
error
(
"商品ID:"
+
obj
.
goodsId
+
" 已下架"
)
return
;
}
if
(
obj
.
state
==
3
){
this
.
$message
.
error
(
"商品ID:"
+
obj
.
goodsId
+
" 已被平台下架"
)
return
;
}
}
let
ids
=
d
.
map
(
r
=>
{
return
r
.
id
}).
join
(
','
)
this
.
$confirm
(
'请确认是否下架选中的商品?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'error'
}).
then
(
function
()
{
return
isNotUpon
({
ids
:
ids
})
}).
then
(
data
=>
{
this
.
$message
.
success
(
'下架成功'
)
this
.
getList
(
this
.
page
)
})
},
// 删除
...
...
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