Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
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
office
haoban-4
Commits
4ed9a34b
Commit
4ed9a34b
authored
Sep 07, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 审核事项列表
parent
712713e3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
203 additions
and
4 deletions
+203
-4
review.js
src/api/review.js
+5
-0
audit-item-list.vue
src/views/review-center/audit-item-list.vue
+64
-2
create-audit-group.vue
src/views/review-center/create-audit-group.vue
+1
-0
create-audit-item.vue
src/views/review-center/create-audit-item.vue
+133
-2
No files found.
src/api/review.js
View file @
4ed9a34b
...
@@ -45,6 +45,11 @@ let api = {
...
@@ -45,6 +45,11 @@ let api = {
useFormData
:
true
useFormData
:
true
},
// 新增审核组
},
// 新增审核组
getAdminList
:
'/auditGroup/select-manager-list'
,
// 新建、编辑审核组-管理员列表
getAdminList
:
'/auditGroup/select-manager-list'
,
// 新建、编辑审核组-管理员列表
auditItemList
:
'/auditGroup/audit-item-list'
,
// 审核事项列表
delAuditItem
:
'/auditGroup/del-audit-item'
,
// 删除审核事项
addAuditItem
:
'/auditGroup/add-audit-item'
,
// 添加审核事项
editAuditItem
:
'/auditGroup/edit-audit-item'
,
// 编辑审核事项
auditItemDetail
:
'/auditGroup/audit-item-detail'
,
// 审核事项详情
};
};
api
=
getFetch
(
api
,
'/hb-manage-web'
);
api
=
getFetch
(
api
,
'/hb-manage-web'
);
...
...
src/views/review-center/audit-item-list.vue
View file @
4ed9a34b
<
template
>
<
template
>
<div>
审核事项列表
</div>
<div
class=
"audit-item-list"
>
<div
class=
"audit-item-header"
>
<el-button
type=
"primary"
@
click=
"toCreateItem()"
>
新建事项
</el-button>
</div>
<el-table
:data=
"auditItemList"
>
<el-table-column
label=
"审核组"
prop=
"auditGroupName"
:formatter=
"(row, col, val) => val || '--'"
></el-table-column>
<el-table-column
label=
"审核事项"
prop=
"auditTypes"
:formatter=
"(row, col, val) => val || '--'"
></el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"
{ row }">
<el-button
type=
"text"
@
click=
"toCreateItem(row)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"onDelItem(row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
</template>
<
script
>
<
script
>
import
fetch
from
'@/api/review'
;
// eslint-disable-next-line
const
{
auditItemList
,
delAuditItem
}
=
fetch
;
export
default
{
export
default
{
name
:
'AuditItemList'
name
:
'AuditItemList'
,
data
()
{
return
{
wxEnterpriseId
:
''
,
auditItemList
:
[]
};
},
created
()
{
const
haobanUser
=
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)
||
'{}'
);
this
.
wxEnterpriseId
=
haobanUser
.
wxEnterpriseId
;
this
.
getAuditItemList
();
},
methods
:
{
getAuditItemList
()
{
auditItemList
({
wxEnterpriseId
:
this
.
wxEnterpriseId
}).
then
(
res
=>
{
this
.
auditItemList
=
res
.
result
||
[];
});
},
toCreateItem
(
itemData
)
{
const
{
auditItemId
}
=
itemData
||
{};
const
url
=
'/create-audit-item'
;
this
.
$router
.
push
(
auditItemId
?
`
${
url
}
?auditItemid=
${
auditItemId
}
`
:
url
);
},
onDelItem
(
itemData
)
{
const
{
auditGroupName
,
auditItemId
}
=
itemData
;
this
.
$confirm
(
`确定删除【
${
auditGroupName
}
】吗?`
,
'提示'
,
{
type
:
'warning'
}).
then
(()
=>
{
delAuditItem
({
auditItemId
}).
then
(
res
=>
{
this
.
$message
.
success
(
'删除成功!'
);
this
.
getAuditItemList
();
});
});
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.audit-item-list
{
padding
:
20px
;
min-height
:
100%
;
background-color
:
#fff
;
.audit-item-header
{
display
:
flex
;
justify-content
:
flex-end
;
margin-bottom
:
20px
;
}
}
</
style
>
src/views/review-center/create-audit-group.vue
View file @
4ed9a34b
...
@@ -31,6 +31,7 @@ export default {
...
@@ -31,6 +31,7 @@ export default {
name
:
'CreateAuditGroup'
,
name
:
'CreateAuditGroup'
,
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
adminList
:
[],
adminList
:
[],
groupData
:
{
groupData
:
{
auditGroupName
:
''
,
// 审核组名称
auditGroupName
:
''
,
// 审核组名称
...
...
src/views/review-center/create-audit-item.vue
View file @
4ed9a34b
<
template
>
<
template
>
<div>
新建审核事项
</div>
<el-form
class=
"create-audit-item"
:model=
"auditData"
:rules=
"auditDataRules"
ref=
"auditData"
label-width=
"110px"
>
<el-form-item
label=
"审核组名称"
prop=
"auditGroupIds"
>
<el-select
v-model=
"auditData.auditGroupIds"
multiple
collapse-tags
style=
"width: 480px"
>
<el-option
v-for=
"el in auditGroupList"
:key=
"el.auditGroupId"
:value=
"el.auditGroupId"
:label=
"el.auditGroupName"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"审核事项"
prop=
"auditTypes"
>
<el-checkbox-group
v-model=
"auditData.auditTypes"
>
<el-checkbox
class=
"audit-types"
v-for=
"el in auditTypes"
:key=
"el.type"
:label=
"el.type"
>
<p
class=
"audit-type-title"
>
{{
el
.
title
}}
</p>
<p
class=
"audit-type-desc"
>
{{
el
.
desc
}}
</p>
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
style=
"margin-top: 50px"
>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"onSave"
>
{{
auditData
.
auditItemId
?
'保存'
:
'确认新建'
}}
</el-button>
</el-form-item>
</el-form>
</
template
>
</
template
>
<
script
>
<
script
>
import
fetch
from
'@/api/review'
;
// eslint-disable-next-line
const
{
addAuditItem
,
editAuditItem
,
auditItemDetail
,
getAuditGroupList
}
=
fetch
;
export
default
{
export
default
{
name
:
'CreateAuditItem'
name
:
'CreateAuditItem'
,
data
()
{
return
{
loading
:
false
,
// 审核组列表
auditGroupList
:
[],
// 审核事项类型列表
auditTypes
:
[
{
type
:
'3'
,
title
:
'导购账号新增'
,
desc
:
'能看到管辖范围内导购添加的审核事项'
},
{
type
:
'1'
,
title
:
'导购账号绑定'
,
desc
:
'能看到管辖范围内导购账号绑定申请'
}
],
// 审核事项详情数据
auditData
:
{
auditGroupIds
:
[],
// aaa,bbb,cccc
auditTypes
:
[],
// 1,2,3 1、导购账号绑定 2、门店导购解绑,3导购账号新增
wxEnterpriseId
:
''
,
auditItemId
:
''
},
auditDataRules
:
{
auditGroupIds
:
[
{
required
:
true
,
message
:
'请选择审核组'
,
trigger
:
'change'
}
],
auditTypes
:
[
{
required
:
true
,
message
:
'请选择审核事项'
,
trigger
:
'change'
}
]
}
};
},
created
()
{
const
{
auditItemId
}
=
this
.
$route
.
query
;
const
haobanUser
=
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)
||
'{}'
);
this
.
auditData
.
wxEnterpriseId
=
haobanUser
.
wxEnterpriseId
;
if
(
auditItemId
)
{
this
.
getAuditItemDetail
(
auditItemId
);
}
this
.
getAuditGroupList
();
},
methods
:
{
getAuditGroupList
()
{
getAuditGroupList
({
wxEnterpriseId
:
this
.
auditData
.
wxEnterpriseId
}).
then
(
res
=>
{
this
.
auditGroupList
=
res
.
result
||
[];
});
},
getAuditItemDetail
(
auditItemId
)
{
auditItemDetail
({
auditItemId
}).
then
(
res
=>
{
const
{
auditItemId
,
auditGroupId
,
auditTypes
}
=
res
.
result
||
{};
this
.
auditData
.
auditItemId
=
auditItemId
;
if
(
typeof
auditTypes
==
'string'
)
{
this
.
auditData
.
auditTypes
=
auditTypes
.
split
(
','
);
}
if
(
typeof
auditGroupId
==
'string'
)
{
this
.
auditData
.
auditGroupIds
=
auditGroupId
.
split
(
','
);
}
});
},
// 新建、编辑审核事项保存
onSave
()
{
this
.
$refs
.
auditData
.
validate
(
vali
=>
{
if
(
!
vali
)
return
;
const
{
auditGroupIds
,
auditTypes
,
wxEnterpriseId
,
auditItemId
}
=
this
.
auditData
;
const
params
=
{
auditGroupIds
:
auditGroupIds
.
join
(
','
),
auditTypes
:
auditTypes
.
join
(
','
),
wxEnterpriseId
};
if
(
auditItemId
)
{
params
.
auditItemId
=
auditItemId
;
editAuditItem
(
params
).
then
(
succ
.
bind
(
this
,
'保存成功!'
)).
finally
(()
=>
this
.
loading
=
false
);
}
else
{
addAuditItem
(
params
).
then
(
succ
.
bind
(
this
,
'新建成功!'
)).
finally
(()
=>
this
.
loading
=
false
);
}
function
succ
(
message
)
{
this
.
$message
.
success
(
message
);
this
.
$router
.
go
(
-
1
);
}
});
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
.create-audit-item
{
padding
:
30px
;
min-height
:
100%
;
background-color
:
#fff
;
}
.audit-types
{
display
:
block
;
width
:
260px
;
&+.audit-types
{
margin-top
:
10px
;
}
/
deep
/
.el-checkbox__input
{
padding-top
:
4px
;
vertical-align
:
top
;
}
.audit-type-title
{
font-size
:
14px
;
font-weight
:
400
;
line-height
:
22px
;
color
:
@
gray02
;
}
.audit-type-desc
{
font-size
:
12px
;
line-height
:
22px
;
color
:
@
gray03
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment