Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
web
soss
Commits
38544e19
Commit
38544e19
authored
May 18, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品
parent
0779afc2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
23 deletions
+46
-23
src/components/SelectCategory/index.vue
+4
-3
src/views/goods/goods/components/Form.vue
+37
-11
src/views/goods/goods/index.vue
+5
-9
No files found.
src/components/SelectCategory/index.vue
View file @
38544e19
<
template
>
<
template
>
<el-select
<el-select
v-model=
"
v
alue"
v-model=
"
selectV
alue"
style=
"width: 100%"
style=
"width: 100%"
@
change=
"change"
@
change=
"change"
placeholder=
"请选择"
placeholder=
"请选择
分类
"
clearable
clearable
>
>
<el-option
<el-option
...
@@ -28,7 +28,8 @@ export default {
...
@@ -28,7 +28,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
options
:
[],
selectValue
:
this
.
value
,
options
:
[]
};
};
},
},
created
()
{
created
()
{
...
...
src/views/goods/goods/components/Form.vue
View file @
38544e19
...
@@ -22,19 +22,19 @@
...
@@ -22,19 +22,19 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"制作时长"
prop=
"takeTime"
>
<el-form-item
label=
"制作时长"
prop=
"takeTime"
>
<el-input
v-model=
"form.takeTime"
placeholder=
"请输入
制作时长
"
/>
<el-input
v-model=
"form.takeTime"
placeholder=
"请输入
时长,单位秒
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"折扣价"
prop=
"discount"
>
<el-form-item
label=
"折扣价"
prop=
"discount"
>
<el-input
v-model=
"form.discount"
placeholder=
"请输入折扣价"
/>
<el-input
v-model=
"form.discount"
placeholder=
"请输入折扣价
,单位元
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"原价"
prop=
"price"
>
<el-form-item
label=
"原价"
prop=
"price"
>
<el-input
v-model=
"form.price"
placeholder=
"请输入原价"
/>
<el-input
v-model=
"form.price"
placeholder=
"请输入原价
,单位元
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -136,6 +136,30 @@ export default {
...
@@ -136,6 +136,30 @@ export default {
},
},
components
:
{
SelectCategory
,
SelectSpecs
},
components
:
{
SelectCategory
,
SelectSpecs
},
data
()
{
data
()
{
var
validateThumbnail
=
(
rule
,
value
,
callback
)
=>
{
let
thumbnailValue
=
this
.
form
.
pics
.
thumbnail
;
if
(
thumbnailValue
==
undefined
||
thumbnailValue
===
''
)
{
callback
(
new
Error
(
'请上传缩略图点单屏'
));
}
else
{
callback
();
}
};
var
validateIntroImages
=
(
rule
,
value
,
callback
)
=>
{
let
introImagesValue
=
this
.
form
.
pics
.
introImages
;
if
(
introImagesValue
==
undefined
||
introImagesValue
===
''
)
{
callback
(
new
Error
(
'请上传介绍图点单屏'
));
}
else
{
callback
();
}
};
var
validateDetailImages
=
(
rule
,
value
,
callback
)
=>
{
let
detailImagesValue
=
this
.
form
.
pics
.
detailImages
;
if
(
detailImagesValue
==
undefined
||
detailImagesValue
===
''
)
{
callback
(
new
Error
(
'请上传内容图点单屏'
));
}
else
{
callback
();
}
};
return
{
return
{
title
:
""
,
title
:
""
,
specNames
:
""
,
specNames
:
""
,
...
@@ -147,14 +171,16 @@ export default {
...
@@ -147,14 +171,16 @@ export default {
open
:
false
,
open
:
false
,
// 表单校验
// 表单校验
rules
:
{
rules
:
{
spuName
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
status
:
[
category
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
{
spec
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
required
:
true
,
takeTime
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
message
:
"不能为空"
,
discount
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
trigger
:
"blur"
,
price
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
},
thumbnail
:[{
required
:
true
,
validator
:
validateThumbnail
,
trigger
:
'blur'
}],
],
introImages
:[{
required
:
true
,
validator
:
validateIntroImages
,
trigger
:
"blur"
}],
detailImages
:[{
required
:
true
,
validator
:
validateDetailImages
,
trigger
:
"blur"
}],
},
},
goodsTagList
:
[],
goodsTagList
:
[],
inputVisible
:
false
,
inputVisible
:
false
,
...
...
src/views/goods/goods/index.vue
View file @
38544e19
...
@@ -60,6 +60,9 @@
...
@@ -60,6 +60,9 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"250"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"250"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:category:edit']"
>
修改
</el-button>
-->
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-if=
"authBtn(['1', '2', '3', '4'], scope.row.state)"
>
删除
</el-button>
v-if=
"authBtn(['1', '2', '3', '4'], scope.row.state)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['2', '4'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['2', '4'], scope.row.state)"
...
@@ -109,15 +112,8 @@ export default {
...
@@ -109,15 +112,8 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
spuName
:
null
,
spuName
:
null
,
productionTime
:
null
,
state
:
null
,
discountPrice
:
null
,
category
:
null
originalPrice
:
null
,
label
:
null
,
desc
:
null
,
createUserId
:
null
,
updateUserId
:
null
,
shelfTime
:
null
,
status
:
null
,
},
},
options
:
[{
options
:
[{
value
:
'1'
,
value
:
'1'
,
...
...
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