Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
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
bp
op-web-service
Commits
cd26d2b6
Commit
cd26d2b6
authored
Jul 15, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Plain Diff
update:bugfile
parents
47740529
94ce5b84
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
505 additions
and
330 deletions
+505
-330
index.vue
src/pages/Enterprise/Audit/index.vue
+12
-12
enterpriseForm.vue
src/pages/Enterprise/components/enterpriseForm.vue
+34
-45
index.less
src/pages/Goods/Detail/index.less
+7
-0
index.vue
src/pages/Goods/Detail/index.vue
+335
-189
index.css
src/pages/Goods/List/index.css
+0
-26
index.vue
src/pages/Goods/List/index.vue
+26
-17
index.vue
src/pages/Goods/Retail/index.vue
+80
-40
filterInput.js
src/pages/Goods/utils/filterInput.js
+10
-0
index.js
src/router/index.js
+1
-1
No files found.
src/pages/Enterprise/Audit/index.vue
View file @
cd26d2b6
...
@@ -70,19 +70,19 @@
...
@@ -70,19 +70,19 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-image
<el-image
v-if=
"scope.row.sensitiveWord && scope.row.entterprise_image"
v-if=
"scope.row.sensitiveWord && scope.row.entterprise_image
_url
"
fit=
"fill"
fit=
"fill"
:src=
"scope.row.entterprise_image"
:src=
"scope.row.entterprise_image
_url
"
></el-image>
></el-image>
<span
v-else-if=
"
<span
v-else-if=
"
scope.row.sensitiveWord && !scope.row.entterprise_image
scope.row.sensitiveWord && !scope.row.entterprise_image
_url
"
>
无
</span>
"
>
无
</span>
<span
v-else
>
无权限
</span>
<span
v-else
>
无权限
</span>
</
template
>
</
template
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
style=
"width:100%;height:100%"
style=
"width:100%;height:100%"
:src=
"scope.row.entterprise_image"
:src=
"scope.row.entterprise_image
_url
"
></el-image>
></el-image>
</el-popover>
</el-popover>
</template>
</template>
...
@@ -119,19 +119,19 @@
...
@@ -119,19 +119,19 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-image
<el-image
v-if=
"scope.row.sensitiveWord && scope.row.legal_front_id_card"
v-if=
"scope.row.sensitiveWord && scope.row.legal_front_id_card
_url
"
:src=
"scope.row.legal_front_id_card"
:src=
"scope.row.legal_front_id_card
_url
"
fit=
"fill"
fit=
"fill"
></el-image>
></el-image>
<span
v-else-if=
"
<span
v-else-if=
"
scope.row.sensitiveWord && !scope.row.legal_front_id_card
scope.row.sensitiveWord && !scope.row.legal_front_id_card
_url
"
>
无
</span>
"
>
无
</span>
<span
v-else
>
无权限
</span>
<span
v-else
>
无权限
</span>
</
template
>
</
template
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
style=
"width:100%;height:100%"
style=
"width:100%;height:100%"
:src=
"scope.row.legal_front_id_card"
:src=
"scope.row.legal_front_id_card
_url
"
></el-image>
></el-image>
</el-popover>
</el-popover>
</template>
</template>
...
@@ -148,19 +148,19 @@
...
@@ -148,19 +148,19 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-image
<el-image
v-if=
"scope.row.sensitiveWord && scope.row.legal_back_id_card"
v-if=
"scope.row.sensitiveWord && scope.row.legal_back_id_card
_url
"
fit=
"fill"
fit=
"fill"
:src=
"scope.row.legal_back_id_card"
:src=
"scope.row.legal_back_id_card
_url
"
></el-image>
></el-image>
<span
v-else-if=
"
<span
v-else-if=
"
scope.row.sensitiveWord && !scope.row.legal_back_id_card
scope.row.sensitiveWord && !scope.row.legal_back_id_card
_url
"
>
无
</span>
"
>
无
</span>
<span
v-else
>
无权限
</span>
<span
v-else
>
无权限
</span>
</
template
>
</
template
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
style=
"width:100%;height:100%"
style=
"width:100%;height:100%"
:src=
"scope.row.legal_back_id_card"
:src=
"scope.row.legal_back_id_card
_url
"
></el-image>
></el-image>
</el-popover>
</el-popover>
...
...
src/pages/Enterprise/components/enterpriseForm.vue
View file @
cd26d2b6
...
@@ -33,12 +33,13 @@
...
@@ -33,12 +33,13 @@
prop=
"businessLicense"
prop=
"businessLicense"
>
>
<el-image
<el-image
v-if=
"establishForm.entterprise
Image
"
v-if=
"establishForm.entterprise
_image_url
"
style=
"width:200px;height:200px;border-radius:10px"
style=
"width:200px;height:200px;border-radius:10px"
:src=
"establishForm.entterprise
Image
"
:src=
"establishForm.entterprise
_image_url
"
fit=
"cover"
fit=
"cover"
></el-image>
></el-image>
<el-upload
<el-upload
:data=
"
{scenario:`business_license`}"
:show-file-list="false"
:show-file-list="false"
:action="domainName"
:action="domainName"
:accept="'image/*'"
:accept="'image/*'"
...
@@ -84,12 +85,13 @@
...
@@ -84,12 +85,13 @@
prop=
"front_img"
prop=
"front_img"
>
>
<el-image
<el-image
v-if=
"establishForm.
frontImg
"
v-if=
"establishForm.
legal_front_id_card_url
"
style=
"width:200px;height:200px;border-radius:10px"
style=
"width:200px;height:200px;border-radius:10px"
:src=
"establishForm.
frontImg
"
:src=
"establishForm.
legal_front_id_card_url
"
fit=
"cover"
fit=
"cover"
></el-image>
></el-image>
<el-upload
<el-upload
:data=
"
{scenario:`id_card`}"
:show-file-list="false"
:show-file-list="false"
:action="domainName"
:action="domainName"
:accept="'image/*'"
:accept="'image/*'"
...
@@ -109,12 +111,13 @@
...
@@ -109,12 +111,13 @@
prop=
"bak_img"
prop=
"bak_img"
>
>
<el-image
<el-image
v-if=
"establishForm.
bakImg
"
v-if=
"establishForm.
legal_back_id_card_url
"
style=
"width:200px;height:200px;border-radius:10px"
style=
"width:200px;height:200px;border-radius:10px"
:src=
"establishForm.
bakImg
"
:src=
"establishForm.
legal_back_id_card_url
"
fit=
"cover"
fit=
"cover"
></el-image>
></el-image>
<el-upload
<el-upload
:data=
"
{scenario:`id_card`}"
:show-file-list="false"
:show-file-list="false"
:action="domainName"
:action="domainName"
:accept="'image/*'"
:accept="'image/*'"
...
@@ -188,7 +191,7 @@ export default {
...
@@ -188,7 +191,7 @@ export default {
data
()
{
data
()
{
// 营业执照校验规则
// 营业执照校验规则
const
businessRules
=
(
rule
,
value
,
callback
)
=>
{
const
businessRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
establishForm
.
entterprise_image
)
{
if
(
this
.
establishForm
.
entterprise_image
.
length
===
0
)
{
callback
(
new
Error
(
"请上传营业执照"
));
callback
(
new
Error
(
"请上传营业执照"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -197,7 +200,7 @@ export default {
...
@@ -197,7 +200,7 @@ export default {
};
};
// 身份证照片正面校验规则
// 身份证照片正面校验规则
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
establishForm
.
front_img
)
{
if
(
this
.
establishForm
.
legal_front_id_card
.
length
===
0
)
{
callback
(
new
Error
(
"请上传身份正面证照片"
));
callback
(
new
Error
(
"请上传身份正面证照片"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -206,7 +209,7 @@ export default {
...
@@ -206,7 +209,7 @@ export default {
};
};
// 身份证照片反面校验规则
// 身份证照片反面校验规则
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
establishForm
.
bak_img
)
{
if
(
this
.
establishForm
.
legal_back_id_card
.
length
===
0
)
{
callback
(
new
Error
(
"请上传身份反面证照片"
));
callback
(
new
Error
(
"请上传身份反面证照片"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -254,7 +257,7 @@ export default {
...
@@ -254,7 +257,7 @@ export default {
establishForm
:
{
establishForm
:
{
code
:
null
,
// 企业代码(!)
code
:
null
,
// 企业代码(!)
name
:
null
,
// 企业名称(!)
name
:
null
,
// 企业名称(!)
entterprise_image
:
null
,
// 金山云key
(!)
entterprise_image
_url
:
null
,
// 金山云图片地址
(!)
/* *********身份认证信息********* */
/* *********身份认证信息********* */
record_id
:
null
,
// 企业认证id
record_id
:
null
,
// 企业认证id
front_img
:
""
,
// 身份证正面照的金山云objectid(!)
front_img
:
""
,
// 身份证正面照的金山云objectid(!)
...
@@ -263,7 +266,8 @@ export default {
...
@@ -263,7 +266,8 @@ export default {
userName
:
""
,
// 用户姓名(!)
userName
:
""
,
// 用户姓名(!)
legal_mobile
:
""
,
// 法人手机号
legal_mobile
:
""
,
// 法人手机号
data_type
:
null
,
// 企业类型(!)
data_type
:
null
,
// 企业类型(!)
mobile
:
""
// 用户手机号
mobile
:
""
,
// 用户手机号
enterprise_id
:
""
// 返回的企业id
},
},
// 表单校验规则
// 表单校验规则
...
@@ -324,9 +328,12 @@ export default {
...
@@ -324,9 +328,12 @@ export default {
this
.
establishForm
.
data_type
=
val
.
record
.
data_type
;
this
.
establishForm
.
data_type
=
val
.
record
.
data_type
;
this
.
establishForm
.
name
=
val
.
record
.
name
;
this
.
establishForm
.
name
=
val
.
record
.
name
;
this
.
establishForm
.
code
=
val
.
record
.
code
;
this
.
establishForm
.
code
=
val
.
record
.
code
;
this
.
establishForm
.
entterprise_image_url
=
val
.
record
.
entterprise_image_url
;
this
.
establishForm
.
entterprise_image
=
val
.
record
.
entterprise_image
;
this
.
establishForm
.
entterprise_image
=
val
.
record
.
entterprise_image
;
this
.
establishForm
.
front_img
=
val
.
record
.
legal_front_id_card
;
this
.
establishForm
.
legal_front_id_card_url
=
val
.
record
.
legal_front_id_card_url
;
this
.
establishForm
.
bak_img
=
val
.
record
.
legal_back_id_card
;
this
.
establishForm
.
legal_front_id_card
=
val
.
record
.
legal_front_id_card
;
this
.
establishForm
.
legal_back_id_card_url
=
val
.
record
.
legal_back_id_card_url
;
this
.
establishForm
.
legal_back_id_card
=
val
.
record
.
legal_back_id_card
;
this
.
establishForm
.
idcard_number
=
val
.
record
.
legal_id_card
;
this
.
establishForm
.
idcard_number
=
val
.
record
.
legal_id_card
;
this
.
establishForm
.
userName
=
val
.
record
.
legal_person
;
this
.
establishForm
.
userName
=
val
.
record
.
legal_person
;
this
.
establishForm
.
legal_mobile
=
val
.
record
.
legal_mobile
;
this
.
establishForm
.
legal_mobile
=
val
.
record
.
legal_mobile
;
...
@@ -334,9 +341,6 @@ export default {
...
@@ -334,9 +341,6 @@ export default {
this
.
establishForm
.
legal_mobile
=
val
.
record
.
mobile
;
this
.
establishForm
.
legal_mobile
=
val
.
record
.
mobile
;
this
.
establishForm
.
user_id
=
val
.
record
.
user_id
;
this
.
establishForm
.
user_id
=
val
.
record
.
user_id
;
this
.
establishForm
.
sensitiveWord
=
val
.
record
.
sensitiveWord
;
this
.
establishForm
.
sensitiveWord
=
val
.
record
.
sensitiveWord
;
this
.
establishForm
.
entterpriseImage
=
val
.
record
.
entterprise_image
;
this
.
establishForm
.
frontImg
=
val
.
record
.
legal_front_id_card
;
this
.
establishForm
.
bakImg
=
val
.
record
.
legal_back_id_card
;
}
}
},
},
...
@@ -345,24 +349,24 @@ export default {
...
@@ -345,24 +349,24 @@ export default {
handleEnterpriseSuccess
(
res
)
{
handleEnterpriseSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"entterpriseImageRef"
);
this
.
clearValidate
(
"entterpriseImageRef"
);
this
.
establishForm
.
entterprise
Image
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterprise
_image_url
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterprise_image
=
res
.
result
.
object_id
;
this
.
establishForm
.
entterprise_image
=
`
${
res
.
result
.
bucket
}
/
${
res
.
result
.
object_id
}
`
;
},
},
// 上传身份证前面
// 上传身份证前面
handleFontSuccess
(
res
)
{
handleFontSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"frontImgRef"
);
this
.
clearValidate
(
"frontImgRef"
);
this
.
establishForm
.
frontImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
legal_front_id_card_url
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
front_img
=
res
.
result
.
object_id
;
this
.
establishForm
.
legal_front_id_card
=
`
${
res
.
result
.
bucket
}
/
${
res
.
result
.
object_id
}
`
;
},
},
// 上传身份证后面
// 上传身份证后面
handleBackSuccess
(
res
)
{
handleBackSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"bakImgRef"
);
this
.
clearValidate
(
"bakImgRef"
);
this
.
establishForm
.
bakImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
legal_back_id_card_url
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
bak_img
=
res
.
result
.
object_id
;
this
.
establishForm
.
legal_back_id_card
=
`
${
res
.
result
.
bucket
}
/
${
res
.
result
.
object_id
}
`
;
},
},
// 取消创建表单
// 取消创建表单
...
@@ -394,7 +398,7 @@ export default {
...
@@ -394,7 +398,7 @@ export default {
const
enterpriseQuery
=
{
const
enterpriseQuery
=
{
code
,
code
,
name
,
name
,
entterprise_image
,
entterprise_image
_url
:
entterprise_image
,
data_from
:
3
,
data_from
:
3
,
data_type
,
data_type
,
mobile
,
mobile
,
...
@@ -417,12 +421,11 @@ export default {
...
@@ -417,12 +421,11 @@ export default {
data_type
,
data_type
,
mobile
mobile
}
=
this
.
establishForm
;
}
=
this
.
establishForm
;
entterprise_image
=
this
.
transformObjectId
(
entterprise_image
);
const
editQuery
=
{
const
editQuery
=
{
record_id
:
this
.
enterpriseId
,
enterprise_auth_
record_id
:
this
.
enterpriseId
,
code
,
code
,
name
,
name
,
entterprise_image
,
entterprise_image
_url
:
entterprise_image
,
data_type
,
data_type
,
data_from
:
3
,
data_from
:
3
,
mobile
mobile
...
@@ -445,24 +448,22 @@ export default {
...
@@ -445,24 +448,22 @@ export default {
let
{
let
{
data_type
,
data_type
,
user_id
,
user_id
,
front_img
,
legal_front_id_card
,
bak_img
,
legal_back_id_card
,
idcard_number
,
idcard_number
,
userName
,
userName
,
legal_mobile
legal_mobile
}
=
this
.
establishForm
;
}
=
this
.
establishForm
;
front_img
=
this
.
transformObjectId
(
front_img
);
bak_img
=
this
.
transformObjectId
(
bak_img
);
// 提交法人信息
// 提交法人信息
let
legalQuery
=
{
let
legalQuery
=
{
record_id
:
this
.
enterpriseId
enterprise_auth_
record_id
:
this
.
enterpriseId
?
this
.
enterpriseId
?
this
.
enterpriseId
:
this
.
establishForm
.
enterprise_id
,
:
this
.
establishForm
.
enterprise_id
,
front_completeness
:
0
,
front_completeness
:
0
,
bak_completeness
:
0
,
bak_completeness
:
0
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
front_img
,
posit_image_url
:
legal_front_id_card
,
ba
k_img
,
ba
ck_image_url
:
legal_back_id_card
,
idcard_number
,
idcard_number
,
name
:
userName
,
name
:
userName
,
legal_mobile
,
legal_mobile
,
...
@@ -477,18 +478,6 @@ export default {
...
@@ -477,18 +478,6 @@ export default {
});
});
},
},
// 转换图片地址为ObjectId
transformObjectId
(
urls
)
{
try
{
const
url
=
new
URL
(
urls
);
let
pathName
=
url
.
pathname
;
let
objectId
=
pathName
.
slice
(
1
);
return
objectId
;
}
catch
(
error
)
{
return
urls
;
}
},
// 清除校验
// 清除校验
clearValidate
(
formName
)
{
clearValidate
(
formName
)
{
this
.
$refs
[
formName
].
clearValidate
();
this
.
$refs
[
formName
].
clearValidate
();
...
...
src/pages/Goods/Detail/index.less
View file @
cd26d2b6
...
@@ -48,3 +48,10 @@
...
@@ -48,3 +48,10 @@
background-color: #199ffb;
background-color: #199ffb;
}
}
}
}
.el-input__inner {
padding-right: 15%;
}
.el-textarea__inner {
padding-bottom: 10%;
}
src/pages/Goods/Detail/index.vue
View file @
cd26d2b6
This diff is collapsed.
Click to expand it.
src/pages/Goods/List/index.css
deleted
100644 → 0
View file @
47740529
.goods
{
width
:
100%
;
height
:
100%
;
padding
:
0
30px
;
}
.goods
.search_condition
{
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
align-items
:
center
;
}
.goods
.search_condition
.search_button
{
display
:
flex
;
align-items
:
center
;
justify-self
:
flex-end
;
}
.goods
.search_condition
.search_button
.el-form-item__content
{
display
:
flex
;
justify-content
:
space-around
;
}
.goods
.commodity_list
{
margin-top
:
30px
;
}
.goods
.pagination
{
margin-top
:
30px
;
}
src/pages/Goods/List/index.vue
View file @
cd26d2b6
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<!-- 所属分类 -->
<!-- 所属分类 -->
<el-form-item
label=
"所属分类"
>
<el-form-item
label=
"所属分类"
>
<el-cascader
<el-cascader
v-model=
"searchProps.classValue"
@
change=
"handleTypeChange"
@
change=
"handleTypeChange"
:options=
"labelOptions"
:options=
"labelOptions"
:props=
"cascaderProps"
:props=
"cascaderProps"
...
@@ -32,8 +33,8 @@
...
@@ -32,8 +33,8 @@
<el-form-item
label=
"生活号名称"
>
<el-form-item
label=
"生活号名称"
>
<el-input
v-model=
"searchProps.life_account_name"
></el-input>
<el-input
v-model=
"searchProps.life_account_name"
></el-input>
</el-form-item>
</el-form-item>
<!--
商品
状态 -->
<!--
审核
状态 -->
<el-form-item
label=
"
商品
状态"
>
<el-form-item
label=
"
审核
状态"
>
<el-select
<el-select
v-model=
"audit_status"
v-model=
"audit_status"
multiple
multiple
...
@@ -134,15 +135,15 @@
...
@@ -134,15 +135,15 @@
>
审核驳回
</span>
>
审核驳回
</span>
<span
<span
v-if=
"scope.row.online_status == 0"
v-if=
"scope.row.online_status == 0
&& scope.row.audit_status != 2
"
style=
"color:#FF982C;"
style=
"color:#FF982C;"
>
未上架
</span>
>
未上架
</span>
<span
<span
v-if=
"scope.row.online_status == 1"
v-if=
"scope.row.online_status == 1
&& scope.row.audit_status != 2
"
style=
"color:#5CC247;"
style=
"color:#5CC247;"
>
已上架
</span>
>
已上架
</span>
<span
<span
v-if=
"scope.row.online_status == 2"
v-if=
"scope.row.online_status == 2
&& scope.row.audit_status != 2
"
style=
"color:#FD6B6F;"
style=
"color:#FD6B6F;"
>
已下架
</span>
>
已下架
</span>
</
template
>
</
template
>
...
@@ -166,7 +167,6 @@
...
@@ -166,7 +167,6 @@
>
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
v-if=
"scope.row.audit_status == 2 || scope.row.online_status == 1 || scope.row.online_status == 2"
type=
"text"
type=
"text"
@
click=
"goDetail(`EDIT`, scope.row.goods_spu_id)"
@
click=
"goDetail(`EDIT`, scope.row.goods_spu_id)"
>
编辑
</el-button>
>
编辑
</el-button>
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
>
审核
</el-button>
>
审核
</el-button>
<el-popconfirm
<el-popconfirm
v-if=
"scope.row.online_status == 2
|| scope.row.audit_status != 0 && scope.row.online_status == 0
"
v-if=
"scope.row.online_status == 2 "
title=
"您确定要上架该商品吗?"
title=
"您确定要上架该商品吗?"
cancelButtonType=
"default"
cancelButtonType=
"default"
@
confirm=
"changeGoodsState('GROUNDING', scope.row.goods_spu_id)"
@
confirm=
"changeGoodsState('GROUNDING', scope.row.goods_spu_id)"
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
</el-popconfirm>
</el-popconfirm>
<el-popconfirm
<el-popconfirm
v-if=
"
scope.row.online_status == 1
"
v-if=
"
scope.row.online_status != 2 && (scope.row.audit_status == 1 || scope.row.online_status == 1)
"
title=
"您确定要下架该商品吗?"
title=
"您确定要下架该商品吗?"
cancelButtonType=
"default"
cancelButtonType=
"default"
@
confirm=
"
@
confirm=
"
...
@@ -200,6 +200,11 @@
...
@@ -200,6 +200,11 @@
<el-button
type=
"text"
>
下架
</el-button>
<el-button
type=
"text"
>
下架
</el-button>
</
template
>
</
template
>
</el-popconfirm>
</el-popconfirm>
<el-button
@
click=
"goDetail(`DETAIL`,scope.row.goods_spu_id)"
type=
"text"
>
详情
</el-button>
</template>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -262,14 +267,15 @@ export default {
...
@@ -262,14 +267,15 @@ export default {
category_2_id
:
""
,
// 二级分类id
category_2_id
:
""
,
// 二级分类id
life_account_id
:
""
,
life_account_id
:
""
,
life_account_name
:
""
,
life_account_name
:
""
,
audit_status
:
""
,
// 商品状态
audit_status
:
""
,
// 审核状态
online_status
:
""
// 上架状态
online_status
:
""
,
// 上架状态
classValue
:
""
},
},
// 级联选择器
// 级联选择器
labelOptions
:
[],
labelOptions
:
[],
//
商品
状态
//
审核
状态
stateOption
:
[
stateOption
:
[
{
value
:
0
,
label
:
"待审核"
},
{
value
:
0
,
label
:
"待审核"
},
{
value
:
1
,
label
:
"审核通过"
},
{
value
:
1
,
label
:
"审核通过"
},
...
@@ -333,7 +339,7 @@ export default {
...
@@ -333,7 +339,7 @@ export default {
this
.
searchProps
.
category_1_id
=
this
.
getVal
(
val
,
0
);
this
.
searchProps
.
category_1_id
=
this
.
getVal
(
val
,
0
);
this
.
searchProps
.
category_2_id
=
this
.
getVal
(
val
,
1
);
this
.
searchProps
.
category_2_id
=
this
.
getVal
(
val
,
1
);
},
},
//
商品
状态赋值
//
审核
状态赋值
handleStatusChange
(
val
)
{
handleStatusChange
(
val
)
{
this
.
searchProps
.
audit_status
=
this
.
getValue
(
val
);
this
.
searchProps
.
audit_status
=
this
.
getValue
(
val
);
},
},
...
@@ -348,7 +354,7 @@ export default {
...
@@ -348,7 +354,7 @@ export default {
},
},
// 重置表单
// 重置表单
resetList
()
{
resetList
()
{
(
this
.
searchProps
=
{
this
.
searchProps
=
{
page
:
1
,
// 页码
page
:
1
,
// 页码
page_size
:
20
,
// 页数大小
page_size
:
20
,
// 页数大小
goods_spu_id
:
""
,
// 后台商品id
goods_spu_id
:
""
,
// 后台商品id
...
@@ -357,9 +363,12 @@ export default {
...
@@ -357,9 +363,12 @@ export default {
category_2_id
:
""
,
// 二级分类id
category_2_id
:
""
,
// 二级分类id
life_account_id
:
""
,
life_account_id
:
""
,
life_account_name
:
""
,
life_account_name
:
""
,
audit_status
:
""
,
// 商品状态
audit_status
:
""
,
// 审核状态
online_status
:
""
// 上架状态
online_status
:
""
,
// 上架状态
}),
classValue
:
""
};
this
.
audit_status
=
[];
this
.
onlineStatus
=
[];
this
.
getCommodityList
();
this
.
getCommodityList
();
},
},
// 上架/下架操作
// 上架/下架操作
...
...
src/pages/Goods/Retail/index.vue
View file @
cd26d2b6
<
template
>
<
template
>
<layout>
<layout>
<el-card
class=
"container"
style=
"width: 100%; height: 100%"
>
<el-card
class=
"container"
style=
"width: 100%; height: 100%"
>
<div
class=
"retail"
>
<div
class=
"retail"
>
<el-form
inline
:model=
"retailActivitie"
ref=
"retailActivitie"
>
<el-form
inline
:model=
"retailActivitie"
ref=
"retailActivitie"
>
<!-- 查询 -->
<!-- 查询 -->
<el-row>
<el-row>
<el-form-item
label=
"分销活动id"
prop=
"marketing_id"
>
<el-form-item
label=
"分销活动id"
prop=
"marketing_id"
>
<!-- :rules="[
{ type: 'number', message: '活动id必须为数字值' }]" -->
<!-- :rules="[
{ type: 'number', message: '活动id必须为数字值' }]" -->
<el-input
<el-input
onkeyup=
"value=value.replace(/[^\d]/g,'')"
onkeyup=
"value=value.replace(/[^\d]/g,'')"
...
@@ -34,7 +44,10 @@
...
@@ -34,7 +44,10 @@
</el-form-item>
</el-form-item>
<!-- 按钮操作 -->
<!-- 按钮操作 -->
<el-form-item
class=
"search_button"
>
<el-form-item
class=
"search_button"
>
<el-button
type=
"primary"
@
click=
"toSearch"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"toSearch"
>
搜索
</el-button>
<el-button
@
click=
"reset('retailActivitie')"
>
重置
</el-button>
<el-button
@
click=
"reset('retailActivitie')"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-row>
</el-row>
...
@@ -42,10 +55,14 @@
...
@@ -42,10 +55,14 @@
type=
"primary"
type=
"primary"
style=
"margin-bottom: 10px"
style=
"margin-bottom: 10px"
@
click=
"createDtb"
@
click=
"createDtb"
>
创建分销活动
</el-button
>
创建分销活动
</el-button>
>
<!-- Tab -->
<!-- Tab -->
<el-table
:data=
"tableData"
type=
"index"
align=
"center"
border
>
<el-table
:data=
"tableData"
type=
"index"
align=
"center"
border
>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"marketing_id"
prop=
"marketing_id"
...
@@ -91,11 +108,13 @@
...
@@ -91,11 +108,13 @@
</span>
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
prop=
"online_status"
label=
"状态"
>
<el-table-column
<
template
#
default=
"scope"
>
align=
"center"
<span
prop=
"online_status"
:style=
"
{ color: scope.row.online_status == 3 ? 'red' : '' }
"
label=
"状态
"
>
>
<
template
#
default=
"scope"
>
<span
:style=
"
{ color: scope.row.online_status == 3 ? 'red' : '' }">
{{
{{
scope
.
row
.
online_status
==
2
scope
.
row
.
online_status
==
2
?
"关闭"
?
"关闭"
...
@@ -112,9 +131,17 @@
...
@@ -112,9 +131,17 @@
label=
"创建人"
label=
"创建人"
>
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
prop=
"create_time"
label=
"创建时间"
>
<el-table-column
align=
"center"
prop=
"create_time"
label=
"创建时间"
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
prop=
"update_time"
label=
"更新时间"
>
<el-table-column
align=
"center"
prop=
"update_time"
label=
"更新时间"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
...
@@ -122,14 +149,17 @@
...
@@ -122,14 +149,17 @@
label=
"分销到期时间"
label=
"分销到期时间"
>
>
</el-table-column>
</el-table-column>
<el-table-column
fixed=
"right"
align=
"center"
label=
"操作"
>
<el-table-column
fixed=
"right"
align=
"center"
label=
"操作"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
@
click=
"handleClick(scope.row)"
@
click=
"handleClick(scope.row)"
type=
"text"
type=
"text"
size=
"mini"
size=
"mini"
>
查看
</el-button
>
查看
</el-button>
>
<el-button
<el-button
type=
"text"
type=
"text"
size=
"mini"
size=
"mini"
...
@@ -149,8 +179,7 @@
...
@@ -149,8 +179,7 @@
scope.row.online_status !== 3
scope.row.online_status !== 3
"
"
@
click
.
stop=
"handelEnable(scope.row, 1)"
@
click
.
stop=
"handelEnable(scope.row, 1)"
>
启用
</el-button
>
启用
</el-button>
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -197,7 +226,10 @@
...
@@ -197,7 +226,10 @@
:disabled=
"shopStart !== 0"
:disabled=
"shopStart !== 0"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"一级佣金:"
prop=
"first_commission_value"
>
<el-form-item
label=
"一级佣金:"
prop=
"first_commission_value"
>
<el-input
<el-input
v-model=
"ruleForm.first_commission_value"
v-model=
"ruleForm.first_commission_value"
@
input=
"changeValue($event, 'first_commission_value')"
@
input=
"changeValue($event, 'first_commission_value')"
...
@@ -206,7 +238,10 @@
...
@@ -206,7 +238,10 @@
<
template
#
append
>
%
</
template
>
<
template
#
append
>
%
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"二级佣金: "
prop=
"second_commission_value"
>
<el-form-item
label=
"二级佣金: "
prop=
"second_commission_value"
>
<el-input
<el-input
v-model=
"ruleForm.second_commission_value"
v-model=
"ruleForm.second_commission_value"
@
input=
"changeValue($event, 'second_commission_value')"
@
input=
"changeValue($event, 'second_commission_value')"
...
@@ -238,7 +273,10 @@
...
@@ -238,7 +273,10 @@
ref=
"ruleIdForm"
ref=
"ruleIdForm"
size=
"mini"
size=
"mini"
>
>
<div
class=
"queryBox"
v-show=
"shopStart == 0"
>
<div
class=
"queryBox"
v-show=
"shopStart == 0"
>
<el-form-item
label=
"关联商品:"
>
</el-form-item>
<el-form-item
label=
"关联商品:"
>
</el-form-item>
<el-form-item
label=
"商品id:"
>
<el-form-item
label=
"商品id:"
>
<el-input
<el-input
...
@@ -257,8 +295,7 @@
...
@@ -257,8 +295,7 @@
size=
"mini"
size=
"mini"
style=
"margin-bottom: 30px"
style=
"margin-bottom: 30px"
@
click=
"findProducts"
@
click=
"findProducts"
>
查询
</el-button
>
查询
</el-button>
>
</div>
</div>
<div
:class=
"shopStart == 0 ? 'newTab' : 'readTab'"
>
<div
:class=
"shopStart == 0 ? 'newTab' : 'readTab'"
>
<el-table
<el-table
...
@@ -271,7 +308,10 @@
...
@@ -271,7 +308,10 @@
style=
"width: 100%"
style=
"width: 100%"
@
selection-change=
"selectGoodsChange"
@
selection-change=
"selectGoodsChange"
>
>
<el-table-column
align=
"center"
type=
"selection"
>
<el-table-column
align=
"center"
type=
"selection"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
...
@@ -333,7 +373,7 @@ import {
...
@@ -333,7 +373,7 @@ import {
}
from
"@/service/Goods/goods"
;
}
from
"@/service/Goods/goods"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
ElMessage
}
from
"element-plus"
;
// 开启关闭防抖
// 开启关闭防抖
function
debounce
(
callback
,
delay
)
{
function
debounce
(
callback
,
delay
)
{
let
timer
=
null
;
let
timer
=
null
;
return
function
(...
args
)
{
return
function
(...
args
)
{
if
(
timer
)
{
if
(
timer
)
{
...
@@ -443,7 +483,7 @@ export default {
...
@@ -443,7 +483,7 @@ export default {
else
this
.
ruleForm
[
level
]
=
""
;
else
this
.
ruleForm
[
level
]
=
""
;
},
},
// 查看详情列表
// 查看详情列表
async
handleClick
(
row
)
{
async
handleClick
(
row
)
{
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
this
.
shopStart
=
1
;
this
.
shopStart
=
1
;
this
.
disabled
=
true
;
this
.
disabled
=
true
;
...
@@ -459,13 +499,13 @@ export default {
...
@@ -459,13 +499,13 @@ export default {
}
}
},
},
// 页码变化
// 页码变化
handleCurrentChange
(
e
)
{
handleCurrentChange
(
e
)
{
this
.
retailActivitie
.
page
=
e
;
this
.
retailActivitie
.
page
=
e
;
this
.
getMarketingList
();
this
.
getMarketingList
();
},
},
// 营销活动列表
// 营销活动列表
async
getMarketingList
()
{
async
getMarketingList
()
{
try
{
try
{
const
res
=
await
getMarketingList
(
this
.
retailActivitie
);
const
res
=
await
getMarketingList
(
this
.
retailActivitie
);
this
.
tableData
=
res
.
result
;
this
.
tableData
=
res
.
result
;
...
@@ -493,12 +533,12 @@ export default {
...
@@ -493,12 +533,12 @@ export default {
}
}
},
300
),
},
300
),
// 创建分销活动
// 创建分销活动
createDtb
()
{
createDtb
()
{
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
this
.
shopStart
=
0
;
this
.
shopStart
=
0
;
},
},
// 重置
// 重置
reset
(
retailActivitie
)
{
reset
(
retailActivitie
)
{
(
this
.
retailActivitie
=
{
(
this
.
retailActivitie
=
{
marketing_id
:
""
,
marketing_id
:
""
,
marketing_name
:
""
,
marketing_name
:
""
,
...
@@ -511,11 +551,11 @@ export default {
...
@@ -511,11 +551,11 @@ export default {
this
.
getMarketingList
({});
this
.
getMarketingList
({});
},
},
// 搜索
// 搜索
toSearch
()
{
toSearch
()
{
this
.
getMarketingList
();
this
.
getMarketingList
();
console
.
log
(
this
.
retailActivitie
);
console
.
log
(
this
.
retailActivitie
);
},
},
selectTime
(
e
)
{
selectTime
(
e
)
{
let
date
=
new
Date
();
let
date
=
new
Date
();
if
(
e
&&
e
[
1
]
<
date
)
{
if
(
e
&&
e
[
1
]
<
date
)
{
ElMessage
(
`'活动结束时间不能早于当前时间'`
);
ElMessage
(
`'活动结束时间不能早于当前时间'`
);
...
@@ -523,9 +563,9 @@ export default {
...
@@ -523,9 +563,9 @@ export default {
}
}
},
},
// 获取时间格式
// 获取时间格式
formatTime
(
date
)
{
formatTime
(
date
)
{
// 封装函数判断是否要在目标前边加 ’0‘
// 封装函数判断是否要在目标前边加 ’0‘
function
getStr
(
target
)
{
function
getStr
(
target
)
{
return
(
""
+
target
).
length
===
1
?
"0"
+
target
:
target
;
return
(
""
+
target
).
length
===
1
?
"0"
+
target
:
target
;
}
}
// 获取月
// 获取月
...
@@ -546,7 +586,7 @@ export default {
...
@@ -546,7 +586,7 @@ export default {
return
timeStr
;
return
timeStr
;
},
},
// 查询商品列表
// 查询商品列表
async
findProducts
()
{
async
findProducts
()
{
// 获取参数
// 获取参数
const
{
goods_sku_id
,
life_account_id
}
=
this
.
ruleIdForm
;
const
{
goods_sku_id
,
life_account_id
}
=
this
.
ruleIdForm
;
let
[
start_time
,
end_time
]
=
this
.
timeSelect
;
let
[
start_time
,
end_time
]
=
this
.
timeSelect
;
...
@@ -575,10 +615,10 @@ export default {
...
@@ -575,10 +615,10 @@ export default {
ElMessage
.
error
(
"请求查询商品列表失败"
);
ElMessage
.
error
(
"请求查询商品列表失败"
);
}
}
},
},
selectGoodsChange
(
e
)
{
selectGoodsChange
(
e
)
{
this
.
ruleForm
.
goods_sku_id
=
e
.
map
((
item
)
=>
item
.
goods_sku_id
);
this
.
ruleForm
.
goods_sku_id
=
e
.
map
((
item
)
=>
item
.
goods_sku_id
);
},
},
async
getAllList
()
{
async
getAllList
()
{
let
all
=
await
getMarketingList
({
let
all
=
await
getMarketingList
({
page
:
1
,
page
:
1
,
page_size
:
this
.
retailActivitie
.
count
,
page_size
:
this
.
retailActivitie
.
count
,
...
@@ -640,7 +680,7 @@ export default {
...
@@ -640,7 +680,7 @@ export default {
},
},
// 清空
// 清空
resetDate
()
{
resetDate
()
{
(
this
.
ruleForm
=
{
(
this
.
ruleForm
=
{
marketing_name
:
""
,
marketing_name
:
""
,
first_commission_value
:
""
,
first_commission_value
:
""
,
...
@@ -659,13 +699,13 @@ export default {
...
@@ -659,13 +699,13 @@ export default {
});
});
},
},
// 取消
// 取消
cancel
()
{
cancel
()
{
this
.
dialogFormVisible
=
false
;
this
.
dialogFormVisible
=
false
;
this
.
resetDate
();
this
.
resetDate
();
this
.
getMarketingList
();
this
.
getMarketingList
();
},
},
},
},
created
()
{
created
()
{
this
.
getMarketingList
();
this
.
getMarketingList
();
this
.
getAllList
();
this
.
getAllList
();
},
},
...
...
src/pages/Goods/utils/filterInput.js
0 → 100644
View file @
cd26d2b6
// 检测内容是否带表情符号
function
checkString
(
strings
)
{
const
checkKey
=
/
[^\u
0020-
\u
007E
\u
00A0-
\u
00BE
\u
2E80-
\u
A4CF
\u
F900-
\u
FAFF
\u
FE30-
\u
FE4F
\u
FF00-
\u
FFEF
\u
0080-
\u
009F
\u
2000-
\u
201f
\u
2026
\u
2022
\u
20ac
\r\n]
/g
;
if
(
checkKey
.
test
(
strings
))
{
return
false
;
}
else
{
return
true
;
};
};
export
default
{
checkString
}
\ No newline at end of file
src/router/index.js
View file @
cd26d2b6
...
@@ -14,7 +14,7 @@ import goodsRouter from "./Goods/index";
...
@@ -14,7 +14,7 @@ import goodsRouter from "./Goods/index";
const
routes
=
[
const
routes
=
[
{
{
path
:
"/op/enterprise"
,
path
:
"/op/enterprise"
,
redirect
:
"/enterprise/certification"
redirect
:
"/
op/
enterprise/certification"
},
},
{
{
path
:
"/op/404"
,
path
:
"/op/404"
,
...
...
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