Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit edd9611e
authored
May 27, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add checklist
1 parent
5f103c55
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
47 deletions
src/config/config.js
src/services/testDrive.js
src/views/testDrive/checkList.vue
src/config/config.js
View file @
edd9611
...
...
@@ -48,6 +48,7 @@ const APPROVAL_API = {
}
// 试驾围栏审批接口
const
TEST_DRIVE_API
=
{
TEST_DRIVE_SEARCH
:
'/trialdrive/approval/searchFenceApp'
TEST_DRIVE_SEARCH
:
'/trialdrive/approval/searchFenceApp'
,
UPDATE_FENCE_APPROVAL
:
'/trialdrive/approval/updateApproval'
}
export
{
API
,
COMMON_API
,
SPECIALSHOP_API
,
VEHICLE_API
,
APPROVAL_API
,
REPORT_API
,
VEHICLEDOC_API
,
TEST_DRIVE_API
}
src/services/testDrive.js
View file @
edd9611
...
...
@@ -7,4 +7,9 @@ function getList (params) {
return
request
(
params
,
url
)
}
export
{
getList
}
function
updateFenceApproval
(
params
)
{
const
url
=
TEST_DRIVE_API
.
UPDATE_FENCE_APPROVAL
return
request
(
params
,
url
,
'post'
)
}
export
{
getList
,
updateFenceApproval
}
src/views/testDrive/checkList.vue
View file @
edd9611
...
...
@@ -34,22 +34,35 @@
>
<span
class=
"dot"
:class=
"scope.scope.
enableStatus ? USERSTATUS[scope.scope.enable
Status].split(',')[1] : ''"
:class=
"scope.scope.
approvalStatus ? USERSTATUS[scope.scope.approval
Status].split(',')[1] : ''"
></span>
<span
class=
"statusText"
>
{{
scope
.
scope
.
enableStatus
?
USERSTATUS
[
scope
.
scope
.
enable
Status
].
split
(
','
)[
0
]
:
'--'
}}
</span>
<span
class=
"statusText"
>
{{
scope
.
scope
.
approvalStatus
?
USERSTATUS
[
scope
.
scope
.
approval
Status
].
split
(
','
)[
0
]
:
'--'
}}
</span>
</span>
<span
slot=
"table-button"
slot-scope=
"scope"
>
<el-button
v-for=
"(j, idx) in testDriveTableParams.tableOption.btnList"
:key=
"idx"
:type=
"j.type || 'text'"
size=
"mini"
plain
@
click=
"btnClick(j.pType, scope.scope)"
>
{{
j
.
name
}}
</el-button>
<template
v-for=
"(j, idx) in testDriveTableParams.tableOption.btnList"
>
<!-- approvalStatus为1也就是未审核状态才展示通过/驳回 -->
<template
v-if=
"(j.pType == 'pass' || j.pType == 'reject') && scope.scope.approvalStatus == 1"
>
<el-button
:key=
"idx"
:type=
"j.type || 'text'"
size=
"mini"
plain
@
click=
"btnClick(j.pType, scope.scope)"
>
{{
j
.
name
}}
</el-button>
</
template
>
<
template
v-if=
"(j.pType !== 'pass' && j.pType !== 'reject') && scope.scope.approvalStatus != 1"
>
<el-button
:key=
"idx"
:type=
"j.type || 'text'"
size=
"mini"
plain
@
click=
"btnClick(j.pType, scope.scope)"
>
{{
j
.
name
}}
</el-button>
</
template
>
</template>
</span>
</basic-table>
</div>
...
...
@@ -57,7 +70,7 @@
</template>
<
script
>
import
{
getList
}
from
'services/testDrive'
import
{
getList
,
updateFenceApproval
}
from
'services/testDrive'
export
default
{
data
()
{
return
{
...
...
@@ -69,13 +82,13 @@ export default {
label
:
'关键字:'
,
type
:
'input'
,
inputType
:
'text'
,
prop
:
'
statu
s'
,
prop
:
'
keyword
s'
,
placeholder
:
'特约店编码|店名称'
,
},
{
label
:
'审核状态:'
,
type
:
'select'
,
prop
:
'
enable
Status'
,
prop
:
'
approval
Status'
,
placeholder
:
'请选择审核状态'
,
options
:
[{
value
:
'1'
,
...
...
@@ -117,6 +130,9 @@ export default {
},
{
label
:
'店级别'
,
prop
:
'shopLevel'
},
{
label
:
'审核结果'
,
prop
:
'approvalResult'
}
],
tableOption
:
{
...
...
@@ -124,23 +140,28 @@ export default {
btnList
:
[
{
name
:
'查看原围栏'
,
pType
:
'view
Origin'
pType
:
'view
'
,
},
{
name
:
'查看修改后围栏'
,
pType
:
'view
UpdatedData'
pType
:
'view
'
,
},
{
name
:
'通过'
,
pType
:
'pass'
pType
:
'pass'
,
},
{
name
:
'驳回'
,
pType
:
'reject'
pType
:
'reject'
,
}
]
}
},
approvalParams
:
{
id
:
''
,
status
:
2
,
remark
:
''
},
getListApi
:
getList
,
// 弹窗
testDriveVisible
:
false
,
...
...
@@ -161,41 +182,55 @@ export default {
},
methods
:
{
btnClick
(
pType
,
scope
)
{
const
{
approvalId
}
=
scope
;
this
.
approvalParams
.
id
=
approvalId
;
switch
(
pType
)
{
case
'create'
:
case
'pass'
:
this
.
approvalParams
.
status
=
2
;
delete
this
.
approvalParams
.
remark
;
this
.
updateFenceApproval
();
break
case
'edit'
:
case
'reject'
:
this
.
approvalParams
.
status
=
3
;
this
.
showRejectRemarks
();
break
case
'view'
:
break
case
'delete'
:
this
.
$confirm
(
'是否要删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
})
break
case
'unbind'
:
this
.
$confirm
(
'是否要解绑, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
})
break
case
'import'
:
break
case
'export'
:
let
query
=
{
fenceId
:
scope
.
bizId
,
readonlyStatus
:
true
};
const
path
=
'/oEshield#/monitor/editFence'
;
history
.
pushState
(
query
,
path
,
path
);
break
}
},
showRejectRemarks
()
{
this
.
$prompt
(
'请输入驳回原因'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
}).
then
(({
value
})
=>
{
this
.
approvalParams
.
remark
=
value
;
this
.
updateFenceApproval
();
}).
catch
(()
=>
{
});
},
updateFenceApproval
()
{
updateFenceApproval
(
this
.
approvalParams
).
then
(
res
=>
{
const
{
code
,
message
}
=
res
;
if
(
code
==
200
)
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
});
this
.
$refs
.
testDriveForm
.
refreshTable
()
}
else
{
this
.
$message
({
type
:
'error'
,
message
});
}
})
},
handleConfirm
(
type
)
{
console
.
log
(
type
)
switch
(
type
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment