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 5e31a2ae
authored
May 27, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/micro-customization-system/micro-trialrun
2 parents
edd9611e
5108d0f3
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
558 additions
and
207 deletions
src/components/search-form/index.vue
src/config/config.js
src/services/common.js
src/services/vehicledoc.js
src/styles/common.scss
src/utils/http.js
src/views/specialShop/addShop/index.vue
src/views/specialShop/index.vue
src/views/toDo/index.vue
src/views/vehicleManage/index.vue
src/views/vehicleSubmit/addVehicle/index.vue
src/views/vehicleSubmit/index.vue
src/views/vehicleSubmit/vehicleCheck/index.vue
src/components/search-form/index.vue
View file @
5e31a2a
...
...
@@ -18,18 +18,20 @@
:type=
"item.inputType || 'text'"
:placeholder=
"item.placeholder || '请输入'"
:readonly=
"item.readonly || false"
clearable
></el-input>
</
template
>
<
template
v-else-if=
"item.type === 'select'"
>
<el-select
v-model=
"formModel[item.prop]"
:placeholder=
"item.placeholder || '请选择'"
clearable
>
<el-option
v-for=
"i in item.options"
:key=
"i[item.value] || i.value"
:label=
"i[item.key] || i.label"
:value=
"i[item.value] || i.value"
:key=
"i[item.value] || i.value
|| i.dictValue
"
:label=
"i[item.key] || i.label
|| i.dictLabel
"
:value=
"i[item.value] || i.value
|| i.dictValue
"
:disabled=
"i.disabled"
>
</el-option>
...
...
@@ -78,6 +80,13 @@
>
</el-date-picker>
</
template
>
<
template
name=
"self"
slot-scope=
"scope"
>
<slot
:scope=
"scope"
>
</slot>
</
template
>
</template>
</el-form-item>
<el-form-item>
...
...
src/config/config.js
View file @
5e31a2a
...
...
@@ -14,7 +14,10 @@ const API = {
}
// 公共接口
const
COMMON_API
=
{
PROVINCE_LIST
:
'/publiccenter/basic/province/list'
PROVINCE_LIST
:
'/publiccenter/basic/province/list'
,
DICTDATA_TYPE
:
'/publiccenter/dict/data/type'
,
ORGINIZA_SIMPLELIST
:
'/usercenter/organization/simplelist'
,
ORGINIZA_SIMPLEROOT
:
'/usercenter/organization/simpleroot'
}
// 特约店接口
const
SPECIALSHOP_API
=
{
...
...
@@ -29,7 +32,8 @@ const VEHICLEDOC_API = {
DOC_SEARCH
:
'/trialdrive/vehicleDoc/search'
,
DOC_BY_CONDITION
:
'/trialdrive/vehicleDoc/findVehDocByCondition'
,
CHENCK_SEARCH
:
'/trialdrive/approval/searchVehiclelicApp'
,
SAVE_DOC
:
'/trialdrive/vehicleDoc/saveOrUpdateVehDoc'
SAVE_DOC
:
'/trialdrive/vehicleDoc/saveOrUpdateVehDoc'
,
UPDATE_APPROVAL
:
'/trialdrive/approval/updateApproval'
}
// 试驾车辆管理接口
const
VEHICLE_API
=
{
...
...
src/services/common.js
View file @
5e31a2a
...
...
@@ -7,4 +7,22 @@ function getProvinceList (params) {
return
request
(
params
,
url
)
}
export
{
getProvinceList
}
// 获取字典详情
function
dictInfo
(
params
)
{
const
url
=
`
${
COMMON_API
.
DICTDATA_TYPE
}
/
${
params
}
`
return
request
({},
url
)
}
// 获取第一级组织列表树
function
getSimpleRoot
(
params
)
{
const
url
=
COMMON_API
.
ORGINIZA_SIMPLEROOT
return
request
(
params
,
url
)
}
// 获取组织列表树
function
getSimpleList
(
params
)
{
const
url
=
COMMON_API
.
ORGINIZA_SIMPLELIST
return
request
(
params
,
url
)
}
export
{
getProvinceList
,
dictInfo
,
getSimpleRoot
,
getSimpleList
}
src/services/vehicledoc.js
View file @
5e31a2a
...
...
@@ -22,7 +22,13 @@ function findVehDoc (params) {
// 保存或者更新上牌资料
function
saveDoc
(
params
)
{
const
url
=
VEHICLEDOC_API
.
SAVE_DOC
return
request
(
params
,
url
)
return
request
(
params
,
url
,
'post'
)
}
// 修改审批的流程
function
updateApproval
(
params
)
{
const
url
=
VEHICLEDOC_API
.
UPDATE_APPROVAL
return
request
(
params
,
url
,
'post'
)
}
export
{
getDocList
,
getCheckList
,
findVehDoc
,
saveDoc
}
export
{
getDocList
,
getCheckList
,
findVehDoc
,
saveDoc
,
updateApproval
}
src/styles/common.scss
View file @
5e31a2a
...
...
@@ -6,6 +6,10 @@
float
:
left
;
}
.m-l-md
{
margin-left
:
20px
;
}
.table-btn
{
margin-bottom
:
20px
;
}
...
...
src/utils/http.js
View file @
5e31a2a
...
...
@@ -92,8 +92,8 @@ const MOCK_CONFIG_URL = 'https://oss-config.test.glsx.com.cn/mock/60a371eafb9c10
let
baseFlag
=
true
const
getBaseUrl
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
//
let BASE_URL = store.state.baseURL
let
BASE_URL
=
'https://oss-config.test.glsx.com.cn/mock/60a75fe7fb9c105681999abe/trialrun'
let
BASE_URL
=
store
.
state
.
baseURL
//
let BASE_URL = 'https://oss-config.test.glsx.com.cn/mock/60a75fe7fb9c105681999abe/trialrun'
if
(
!
BASE_URL
&&
baseFlag
)
{
baseFlag
=
false
instance
({
...
...
src/views/specialShop/addShop/index.vue
View file @
5e31a2a
...
...
@@ -11,33 +11,82 @@
<el-form-item
label=
"特约店名称:"
>
<el-input
v-model=
"shopForm.shopName"
:size=
"btn_size"
placeholder=
"请输入特约店名称"
></el-input>
</el-form-item>
<el-form-item
label=
"特约店编码:"
>
<el-input
v-model=
"shopForm.shopCode"
:size=
"btn_size"
Placeholder=
"请输入特约店编码"
></el-input>
</el-form-item>
<el-form-item
label=
"特约店级别:"
>
<el-radio-group
v-model=
"shopForm.shopLevel"
>
<el-radio
label=
""
>
一级店
</el-radio>
<el-radio
label=
""
>
二级店
</el-radio>
<el-radio
label=
"
1
"
>
一级店
</el-radio>
<el-radio
label=
"
2
"
>
二级店
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<h2>
特约店围栏配置
</h2>
<el-divider></el-divider>
<el-form
ref=
"configForm"
:model=
"configForm"
label-width=
"130px"
:inline=
"true"
>
<el-form-item
label=
"特约店围栏名称:"
>
<el-input
v-model=
"shopForm.shopCode"
:size=
"btn_size"
Placeholder=
"请输入特约店编码"
></el-input>
</el-form-item>
<el-form-item
label=
"特约店围栏名称:"
>
<el-input
v-model=
"shopForm.shopCode"
:size=
"btn_size"
Placeholder=
"请输入特约店编码"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
:size=
"btn_size"
>
更新围栏
</el-button>
</el-form-item>
<el-form-item
label=
"经度:"
>
<el-input
v-model=
"shopForm.shopCode"
:size=
"btn_size"
></el-input>
</el-form-item>
<el-form-item
label=
"纬度:"
>
<el-input
v-model=
"shopForm.shopCode"
:size=
"btn_size"
></el-input>
</el-form-item>
<el-form-item
label=
"特约店详细地址:"
>
<el-input
v-model=
"shopForm.shopCode"
:size=
"btn_size"
></el-input>
</el-form-item>
</el-form>
<div
class=
"ibox-content"
style=
"height: 500px; padding:0 20px;z-index: 100"
>
<fence-map
:mapData=
"mapData"
@
onUpdateMapData=
"updateMapData"
ref=
"fenceMap"
>
</fence-map>
</div>
<div
class=
"ibox-content"
style=
"height: 500px; padding:0 20px;z-index: 100"
>
<fence-map
:mapData=
"mapData"
@
onUpdateMapData=
"updateMapData"
ref=
"fenceMap"
>
</fence-map>
</div>
</div>
</
template
>
...
...
@@ -48,6 +97,7 @@ export default {
data
()
{
return
{
shopForm
:
{},
configForm
:
{},
mapData
:
[]
}
},
...
...
@@ -56,94 +106,94 @@ export default {
},
methods
:
{
init
()
{
this
.
fenceId
=
this
.
$route
.
query
.
id
if
(
typeof
this
.
fenceId
!=
'undefined'
){
this
.
getFenceDetail
(
this
.
fenceId
);
this
.
getFenceSnsList
(
this
.
fenceId
);
}
else
{
// MONITOR_SERVICE.getNewFenceId().then((res)=>{
// if(res.returnCode == 0){
// this.form.fenceNo = res.data.fenceNo;
this
.
fenceId
=
this
.
$route
.
query
.
id
if
(
typeof
this
.
fenceId
!=
'undefined'
)
{
this
.
getFenceDetail
(
this
.
fenceId
);
this
.
getFenceSnsList
(
this
.
fenceId
);
}
else
{
// MONITOR_SERVICE.getNewFenceId().then((res)=>{
// if(res.returnCode == 0){
// this.form.fenceNo = res.data.fenceNo;
// this.$refs.fenceMap.initFence({
// fenceType: 'circle'
// });
// }
// });
// this.$refs.fenceMap.initFence({
// fenceType: 'circle'
// });
// }
// });
// this.restainFenceName = undefined;
}
// this.restainFenceName = undefined;
}
},
getFenceDetail
(
id
){
MONITOR_SERVICE
.
getFenceDetailById
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
const
form
=
this
.
form
;
const
data
=
res
.
data
;
for
(
let
key
in
data
){
form
[
key
]
=
data
[
key
]
}
this
.
form
.
dateRange
=
[
form
.
startTime
,
form
.
endTime
];
this
.
areaCode
=
form
.
areaCode
this
.
restainFenceName
=
form
.
electricFenceName
;
this
.
form
.
msgtel
=
data
.
telNumbers
if
(
form
.
shapeType
===
2
){
this
.
mapData
=
{
fenceType
:
'circle'
,
lng
:
form
.
lng
,
lat
:
form
.
lat
,
radius
:
form
.
radius
,
}
}
else
if
(
form
.
shapeType
===
3
){
this
.
mapData
=
{
fenceType
:
'area'
,
areaCode
:
this
.
form
.
areaCode
}
}
else
if
(
form
.
shapeType
===
5
){
if
(
data
.
lnglat
){
this
.
polygonPath
=
data
.
lnglat
.
split
(
'|'
).
map
((
item
)
=>
{
return
[
item
.
split
(
','
)[
0
],
item
.
split
(
','
)[
1
]]
})
}
getFenceDetail
(
id
)
{
MONITOR_SERVICE
.
getFenceDetailById
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
)
{
const
form
=
this
.
form
;
const
data
=
res
.
data
;
for
(
let
key
in
data
)
{
form
[
key
]
=
data
[
key
]
}
this
.
form
.
dateRange
=
[
form
.
startTime
,
form
.
endTime
];
this
.
areaCode
=
form
.
areaCode
this
.
restainFenceName
=
form
.
electricFenceName
;
this
.
form
.
msgtel
=
data
.
telNumbers
console
.
log
(
this
.
polygonPath
)
this
.
mapData
=
{
fenceType
:
'polygon'
,
polygonPath
:
this
.
polygonPath
}
}
this
.
$refs
.
fenceMap
.
initFence
(
this
.
mapData
);
}
});
},
getFenceSnsList
(
id
,
cur
){
let
params
=
{};
if
(
this
.
currentPage
>
this
.
maxPage
){
return
;
}
if
(
cur
){
params
.
currentPage
=
cur
;
params
.
pageSize
=
this
.
pageSize
;
}
else
{
params
.
currentPage
=
this
.
currentPage
;
params
.
pageSize
=
this
.
pageSize
;
}
params
.
id
=
id
;
MONITOR_SERVICE
.
getFenceSnsList
(
params
).
then
((
res
)
=>
{
if
(
res
.
draw
==
0
){
this
.
tableData
=
this
.
tableData
.
concat
(
res
.
data
);
this
.
maxPage
=
Math
.
ceil
(
res
.
recordsTotal
/
this
.
pageSize
);
this
.
$refs
.
userList
.
reset
(
res
.
data
);
}
});
},
if
(
form
.
shapeType
===
2
)
{
this
.
mapData
=
{
fenceType
:
'circle'
,
lng
:
form
.
lng
,
lat
:
form
.
lat
,
radius
:
form
.
radius
,
}
}
else
if
(
form
.
shapeType
===
3
)
{
this
.
mapData
=
{
fenceType
:
'area'
,
areaCode
:
this
.
form
.
areaCode
}
}
else
if
(
form
.
shapeType
===
5
)
{
if
(
data
.
lnglat
)
{
this
.
polygonPath
=
data
.
lnglat
.
split
(
'|'
).
map
((
item
)
=>
{
return
[
item
.
split
(
','
)[
0
],
item
.
split
(
','
)[
1
]]
})
}
console
.
log
(
this
.
polygonPath
)
this
.
mapData
=
{
fenceType
:
'polygon'
,
polygonPath
:
this
.
polygonPath
}
}
this
.
$refs
.
fenceMap
.
initFence
(
this
.
mapData
);
}
});
},
getFenceSnsList
(
id
,
cur
)
{
let
params
=
{};
if
(
this
.
currentPage
>
this
.
maxPage
)
{
return
;
}
if
(
cur
)
{
params
.
currentPage
=
cur
;
params
.
pageSize
=
this
.
pageSize
;
}
else
{
params
.
currentPage
=
this
.
currentPage
;
params
.
pageSize
=
this
.
pageSize
;
}
params
.
id
=
id
;
MONITOR_SERVICE
.
getFenceSnsList
(
params
).
then
((
res
)
=>
{
if
(
res
.
draw
==
0
)
{
this
.
tableData
=
this
.
tableData
.
concat
(
res
.
data
);
this
.
maxPage
=
Math
.
ceil
(
res
.
recordsTotal
/
this
.
pageSize
);
this
.
$refs
.
userList
.
reset
(
res
.
data
);
}
});
},
updateMapData
()
{
}
...
...
src/views/specialShop/index.vue
View file @
5e31a2a
...
...
@@ -6,8 +6,52 @@
:formModel=
"searchForm"
:formList=
"shopFormList"
>
<slot
name=
"self"
>
<el-select
v-model=
"searchForm.area"
placeholder=
"请选择"
@
change=
"change('area', searchForm.area)"
clearable
>
<el-option
v-for=
"item in areaList"
:key=
"item.id"
:label=
"item.departmentName"
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-model=
"searchForm.province"
placeholder=
"请选择"
@
change=
"change('province', searchForm.province)"
clearable
>
<el-option
v-for=
"item in provinceList"
:key=
"item.id"
:label=
"item.departmentName"
:value=
"item.id"
>
</el-option>
</el-select>
<el-select
v-model=
"searchForm.city"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in cityList"
:key=
"item.id"
:label=
"item.departmentName"
:value=
"item.id"
>
</el-option>
</el-select>
</slot>
<slot
name=
"form-slot"
>
<el-button
style=
"margin-left: 20px;"
type=
"primary"
:size=
"btn_size"
icon=
"el-icon-search"
...
...
@@ -17,6 +61,7 @@
type=
"primary"
:size=
"btn_size"
icon=
"el-icon-refresh"
@
click=
"reset"
>
重置
</el-button>
</slot>
</search-form>
...
...
@@ -66,6 +111,7 @@
<
script
>
import
{
getList
}
from
'services/specialshop'
import
{
getSimpleRoot
,
getSimpleList
}
from
'services/common'
export
default
{
data
()
{
return
{
...
...
@@ -151,10 +197,22 @@ export default {
type
:
'default'
,
pType
:
'export'
}
]
],
areaList
:
[],
provinceList
:
[],
cityList
:
[]
}
},
mounted
()
{
getSimpleRoot
({}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
areaList
=
res
.
data
})
},
methods
:
{
reset
()
{
this
.
searchForm
=
{}
},
btnClick
(
pType
,
scope
)
{
console
.
log
(
pType
)
switch
(
pType
)
{
...
...
@@ -162,13 +220,31 @@ export default {
this
.
$router
.
push
({
name
:
'addShop'
})
break
}
},
change
(
name
,
val
)
{
console
.
log
(
name
,
val
)
if
(
name
==
'province'
&&
this
.
searchForm
.
city
)
this
.
searchForm
.
city
=
''
if
(
name
==
'area'
)
{
if
(
this
.
searchForm
.
province
)
this
.
searchForm
.
province
=
''
if
(
this
.
searchForm
.
city
)
this
.
searchForm
.
city
=
''
}
getSimpleList
({
rootId
:
val
}).
then
(
res
=>
{
if
(
name
==
'area'
)
this
.
provinceList
=
res
.
data
else
this
.
cityList
=
res
.
data
})
}
},
}
</
script
>
<
style
>
.vehicle
.el-form
.el-input__inner
{
width
:
300px
;
<
style
scope
>
.search-form
.el-form-item
{
max-width
:
none
!important
;
}
.el-select
{
width
:
auto
;
}
.vehicle
.el-form
.el-select
.el-input
{
width
:
150px
;
}
</
style
>
\ No newline at end of file
src/views/toDo/index.vue
View file @
5e31a2a
...
...
@@ -72,10 +72,10 @@ export default {
value
:
''
},
{
label
:
'未处理'
,
value
:
0
value
:
1
},
{
label
:
'已处理'
,
value
:
1
value
:
2
}]
},
{
...
...
@@ -126,6 +126,7 @@ export default {
switch
(
type
)
{
case
'todo'
:
// 跳转
console
.
log
(
scope
)
break
}
}
...
...
src/views/vehicleManage/index.vue
View file @
5e31a2a
...
...
@@ -172,7 +172,7 @@ export default {
label
:
'关键字:'
,
type
:
'input'
,
inputType
:
'text'
,
prop
:
's
tatus
'
,
prop
:
's
earchKey
'
,
placeholder
:
'特约店编码|店名称|车架号|设备号|车型'
,
}
],
...
...
@@ -222,7 +222,6 @@ export default {
}
],
tableOption
:
{
width
:
300
,
btnList
:
[
{
name
:
'编辑'
,
...
...
@@ -348,7 +347,7 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteVehicle
({}).
then
(
res
=>
{
deleteVehicle
({
tempId
:
scope
.
tempId
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
...
...
@@ -362,7 +361,7 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
unbindVehicle
({}).
then
(
res
=>
{
unbindVehicle
({
tempId
:
scope
.
tempId
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'解绑成功!'
...
...
@@ -456,7 +455,7 @@ export default {
}
</
script
>
<
style
>
<
style
scope
>
.vehicle
.el-form
.el-input__inner
{
width
:
300px
;
}
...
...
src/views/vehicleSubmit/addVehicle/index.vue
View file @
5e31a2a
<
template
>
<div
style=
"width: calc(100% -
5
00px)"
>
<div
style=
"width: calc(100% -
3
00px)"
>
<h2>
基础信息
</h2>
<el-divider></el-divider>
<rule-form
...
...
@@ -15,12 +15,13 @@
:rules=
"vehicleRules"
ref=
"vehicleImgForm"
label-width=
"120px"
:inline=
"true"
>
<el-form-item
v-for=
"(item, index) in vehicleForm.
picL
ist"
:label=
"item.
label
"
v-for=
"(item, index) in vehicleForm.
l
ist"
:label=
"item.
docName
"
:key=
"index"
:prop=
"'
picL
ist.' + index + '.docUrl'"
:prop=
"'
l
ist.' + index + '.docUrl'"
:rules=
"
{
required: true, message: '图片不能为空', trigger: 'blur'
}"
...
...
@@ -37,26 +38,38 @@
<i
class=
"el-icon-picture-outline"
></i>
</div>
</el-image>
<el-button
class=
"import-btn"
style=
"display: block;"
type=
"primary"
>
上传
{{
item
.
label
}}
<input
type=
"file"
id=
"fileUpload"
class=
"import-input"
accept=
"image/png, image/jpeg, image/jpg"
@
change=
"uploadImg($event, index)"
/>
</el-button>
<div
v-if=
"$route.params.url == 'submit'"
>
<el-button
class=
"import-btn"
style=
"display: block;"
type=
"primary"
>
上传
{{
item
.
docName
}}
<input
type=
"file"
id=
"fileUpload"
class=
"import-input"
accept=
"image/png, image/jpeg, image/jpg"
@
change=
"uploadImg($event, index)"
/>
</el-button>
<span
v-show=
"!item.docUrl"
class=
"red-text"
>
未选择任何文件
</span>
</div>
</el-form-item>
</el-form>
<el-button
class=
"pull-right m-l-md"
type=
"defalut"
@
click=
"handleClose($route.params.url)"
>
{{
$route
.
params
.
url
==
'submit'
?
'取消'
:
'驳回'
}}
</el-button>
<el-button
class=
"pull-right"
type=
"primary"
@
click=
"handleConfirm"
>
确定
</el-button>
@
click=
"handleConfirm($route.params.url)"
>
{{
$route
.
params
.
url
==
'submit'
?
'确定'
:
'通过'
}}
</el-button>
</div>
</
template
>
...
...
@@ -65,72 +78,123 @@ import _ from 'lodash'
import
axios
from
'axios'
import
sign
from
'services/sign'
import
qs
from
'qs'
import
{
findVehDoc
,
saveDoc
,
updateApproval
}
from
'services/vehicledoc'
export
default
{
data
()
{
return
{
baseURL
:
'http://qcdidicb.glsx.net:7060'
,
vehicleForm
:
{
picL
ist
:
[
l
ist
:
[
{
label
:
'车辆登记证'
,
docName
:
'车辆登记证'
,
docType
:
1
,
docUrl
:
''
},
{
label
:
'车辆发票'
,
docName
:
'车辆发票'
,
docType
:
2
,
docUrl
:
''
},
{
label
:
'交强险'
,
docName
:
'交强险'
,
docType
:
3
,
docUrl
:
''
},
{
label
:
'商业险'
,
docName
:
'商业险'
,
docType
:
4
,
docUrl
:
''
},
{
label
:
'行驶证'
,
docName
:
'行驶证'
,
docType
:
5
,
docUrl
:
''
},
{
label
:
'车身照'
,
docName
:
'车身照'
,
docType
:
6
,
docUrl
:
''
}
]
},
submitData
:
[
'shopName'
,
'vin'
,
'modelName'
],
checkData
:
[
'shopName'
,
'vin'
,
'modelName'
,
'licensePlate'
,
'buyType'
,
'registrationDate'
,
'saleManager'
,
'saleManagerPhone'
,
'remark'
],
vehicleData
:
[
{
label
:
'特约店名称:'
,
prop
:
'shopName'
,
type
:
'input'
},
{
label
:
'车架号:'
,
prop
:
'vin'
,
type
:
'input'
},
{
label
:
'车型:'
,
prop
:
'modelId'
,
type
:
'select'
,
options
:
[],
clearable
:
true
},
{
label
:
'审核状态:'
,
prop
:
'configDesc'
,
type
:
'select'
,
options
:
[],
clearable
:
true
},
{
label
:
'特约店名称:'
,
prop
:
'shopName'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'车架号:'
,
prop
:
'vin'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'车型:'
,
prop
:
'modelName'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'车牌:'
,
prop
:
'licensePlate'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'服役类型:'
,
prop
:
'serveType'
,
type
:
'select'
,
options
:
[],
clearable
:
true
},
{
label
:
'上牌日期:'
,
prop
:
'sn'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'销售经理:'
,
prop
:
'sn'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'销售经理电话:'
,
prop
:
'sn'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'备注:'
,
prop
:
'sn'
,
type
:
'input'
,
inputText
:
'textarea'
,
clearable
:
true
}
{
label
:
'购置方式:'
,
prop
:
'buyType'
,
type
:
'select'
,
options
:
[{
label
:
'租赁方式购置'
,
value
:
1
}],
clearable
:
true
},
{
label
:
'上牌日期:'
,
prop
:
'registrationDate'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'销售经理:'
,
prop
:
'saleManager'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'销售经理电话:'
,
prop
:
'saleManagerPhone'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'备注:'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
,
clearable
:
true
}
],
defalutData
:
[
{
label
:
'特约店名称:'
,
prop
:
'shopName'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'车架号:'
,
prop
:
'vin'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'车型:'
,
prop
:
'modelName'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'车牌:'
,
prop
:
'licensePlate'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'购置方式:'
,
prop
:
'buyType'
,
type
:
'select'
,
options
:
[{
label
:
'租赁方式购置'
,
value
:
1
}],
clearable
:
true
},
{
label
:
'上牌日期:'
,
prop
:
'registrationDate'
,
type
:
'input'
,
disabled
:
true
},
{
label
:
'销售经理:'
,
prop
:
'saleManager'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'销售经理电话:'
,
prop
:
'saleManagerPhone'
,
type
:
'input'
,
clearable
:
true
},
{
label
:
'备注:'
,
prop
:
'remark'
,
type
:
'input'
,
inputText
:
'textarea'
,
clearable
:
true
}
],
vehicleRules
:
{
shopName
:
[{
required
:
true
}],
vin
:
[{
required
:
true
,
message
:
'请输入车架号'
,
trigger
:
'blur'
}],
modelId
:
[{
required
:
true
,
message
:
'请选择车型'
,
trigger
:
'change'
}],
configDesc
:
[{
required
:
true
,
message
:
'请输入配置'
,
trigger
:
'blur'
}],
licensePlate
:
[{
required
:
true
,
message
:
'请输入车牌'
,
trigger
:
'blur'
}],
color
:
[{
required
:
true
,
message
:
'请输入外色'
,
trigger
:
'blur
'
}],
innerColor
:
[{
required
:
true
,
message
:
'请输入内色
'
,
trigger
:
'blur'
}],
s
erveType
:
[{
required
:
true
,
message
:
'请选择服役类型
'
,
trigger
:
'blur'
}]
serveType
:
[{
required
:
true
,
message
:
'请选择购置方式'
,
trigger
:
'change
'
}],
saleManager
:
[{
required
:
true
,
message
:
'请输入销售经理
'
,
trigger
:
'blur'
}],
s
aleManagerPhone
:
[{
required
:
true
,
message
:
'请输入销售经理电话
'
,
trigger
:
'blur'
}]
},
picList
:
[
{
key
:
1
,
label
:
'车辆登记证'
,
docUrl
:
''
},
{
key
:
2
,
label
:
'车辆发票'
,
docUrl
:
''
}
]
}
},
watch
:
{
'$route.params'
(
val
)
{
console
.
log
(
val
,
'watch'
)
if
(
val
.
vehicleId
)
{
findVehDoc
({
vehicleId
:
val
.
vehicleId
}).
then
(
res
=>
{
if
(
val
.
url
==
'submit'
)
{
this
.
submitData
.
forEach
(
item
=>
{
this
.
$set
(
this
.
vehicleForm
,
item
,
res
.
data
[
item
])
})
}
else
{
this
.
checkData
.
forEach
(
item
=>
{
this
.
$set
(
this
.
vehicleForm
,
item
,
res
.
data
[
item
])
})
this
.
$set
(
this
.
vehicleForm
,
'list'
,
res
.
data
.
vehicleDocDtoList
)
}
})
}
if
(
val
.
url
==
'check'
)
{
this
.
vehicleData
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'disabled'
,
true
)
})
}
else
if
(
'submit'
)
{
this
.
vehicleData
=
_
.
cloneDeep
(
this
.
defalutData
)
}
}
},
mounted
()
{
let
params
=
this
.
$route
.
params
findVehDoc
({
vehicleId
:
params
.
vehicleId
}).
then
(
res
=>
{
if
(
params
.
url
==
'submit'
)
{
this
.
submitData
.
forEach
(
item
=>
{
this
.
$set
(
this
.
vehicleForm
,
item
,
res
.
data
[
item
])
})
}
else
{
this
.
checkData
.
forEach
(
item
=>
{
this
.
$set
(
this
.
vehicleForm
,
item
,
res
.
data
[
item
])
})
this
.
$set
(
this
.
vehicleForm
,
'list'
,
res
.
data
.
vehicleDocDtoList
)
}
})
if
(
params
.
url
==
'check'
)
{
this
.
vehicleData
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'disabled'
,
true
)
})
}
else
if
(
'submit'
)
{
this
.
vehicleData
=
_
.
cloneDeep
(
this
.
defalutData
)
}
},
methods
:
{
...
...
@@ -140,17 +204,90 @@ export default {
case
'submit'
:
console
.
log
(
this
.
vehicleForm
)
this
.
$refs
.
vehicleSubmitForm
.
$children
[
0
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// addVehicle({}).then(res => {
// console.log(res)
// })
let
errorFlag
=
false
this
.
vehicleForm
.
list
.
forEach
(
item
=>
{
if
(
!
item
.
docUrl
)
errorFlag
=
true
})
if
(
valid
&&
!
errorFlag
)
{
const
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
vehicleForm
))
params
.
tempId
=
this
.
$route
.
params
.
vehicleId
saveDoc
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
200
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
})
this
.
$router
.
replace
(
'/vehicleSubmit'
)
}
else
{
this
.
$message
({
message
:
'操作失败'
,
type
:
'error'
})
}
})
}
})
break
case
'check'
:
const
params
=
{
id
:
this
.
$route
.
params
.
approvalId
,
status
:
2
}
updateApproval
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
})
this
.
$router
.
replace
(
'/vehicleCheck'
)
}
else
{
this
.
$message
({
message
:
'操作失败'
,
type
:
'error'
})
}
})
break
}
},
handleClose
()
{
handleClose
(
type
)
{
switch
(
type
)
{
case
'submit'
:
this
.
$router
.
go
(
-
1
)
break
case
'check'
:
this
.
$prompt
(
'请输入驳回原因'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
}).
then
(({
value
})
=>
{
const
params
=
{
id
:
this
.
$route
.
params
.
approvalId
,
status
:
3
,
remark
:
value
}
updateApproval
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
})
this
.
$router
.
replace
(
'/vehicleCheck'
)
}
else
{
this
.
$message
({
message
:
'操作失败'
,
type
:
'error'
})
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'取消输入'
})
})
break
}
},
// 上传图片
uploadImg
(
e
,
index
)
{
...
...
@@ -182,7 +319,7 @@ export default {
const
data
=
sign
(
params
,
noSignAttr
)
axios
.
post
(
`
${
fileUploadURL
}
/router?method=
${
method
}
`
,
qs
.
stringify
(
data
)).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
this
.
$set
(
this
.
vehicleForm
.
picL
ist
[
index
],
'docUrl'
,
res
.
data
.
data
)
this
.
$set
(
this
.
vehicleForm
.
l
ist
[
index
],
'docUrl'
,
res
.
data
.
data
)
targetObj
.
url
=
res
.
data
.
data
}
const
fileData
=
new
Array
(
targetObj
)
...
...
src/views/vehicleSubmit/index.vue
View file @
5e31a2a
...
...
@@ -17,6 +17,7 @@
type=
"primary"
:size=
"btn_size"
icon=
"el-icon-refresh"
@
click=
"reset"
>
重置
</el-button>
</slot>
</search-form>
...
...
@@ -43,6 +44,7 @@
slot-scope=
"scope"
>
<el-button
v-if=
"scope.scope.isbutton"
type=
"text"
@
click=
"btnClick('submit', scope.scope)"
>
...
...
@@ -56,6 +58,7 @@
<
script
>
import
{
getDocList
}
from
'services/vehicledoc'
import
{
dictInfo
}
from
'services/common'
export
default
{
data
()
{
return
{
...
...
@@ -65,20 +68,20 @@ export default {
label
:
'关键字:'
,
type
:
'input'
,
inputType
:
'text'
,
prop
:
'
statu
s'
,
prop
:
'
keyword
s'
,
placeholder
:
'特约店编码|店名称|围栏名称'
,
},
{
label
:
'提交状态:'
,
type
:
'select'
,
prop
:
''
,
prop
:
'
submitStatus
'
,
placeholder
:
'请选择'
,
options
:
[]
},
{
label
:
'审核状态:'
,
type
:
'select'
,
prop
:
''
,
prop
:
'
approvalStatus
'
,
placeholder
:
'请选择'
,
options
:
[]
}
...
...
@@ -90,7 +93,7 @@ export default {
tableColumns
:
[
{
label
:
'所属大区'
,
prop
:
'
tempId
'
prop
:
'
area
'
},
{
label
:
'所属省'
,
prop
:
'province'
...
...
@@ -108,7 +111,7 @@ export default {
prop
:
'shopLevel'
},
{
label
:
'车辆类型'
,
prop
:
'
shopLevel
'
prop
:
'
vehicleType
'
},
{
label
:
'车架号'
,
prop
:
'vin'
...
...
@@ -119,33 +122,50 @@ export default {
label
:
'配置'
,
prop
:
'configDesc'
},
{
label
:
'车牌'
,
prop
:
'licensePlate'
},
{
label
:
'外色'
,
prop
:
'
sns
'
prop
:
'
color
'
},
{
label
:
'内色'
,
prop
:
'in
stalledTime
'
prop
:
'in
nerColor
'
},
{
label
:
'提交状态'
,
prop
:
'installedTime'
prop
:
'submitStatus'
,
formatter
:
(
cellValue
)
=>
{
return
this
.
submitStatusList
.
find
(
item
=>
item
.
dictValue
==
cellValue
.
submitStatus
).
dictLabel
}
},
{
label
:
'审核状态'
,
prop
:
'
installedTime
'
prop
:
'
approvalStatus
'
},
{
label
:
'审核结果备注'
,
prop
:
'
installedTime
'
prop
:
'
remark
'
}
]
},
getListApi
:
getDocList
,
submitStatusList
:
[],
approvalStatusList
:
[]
}
},
mounted
()
{
dictInfo
(
'submitStatus'
).
then
(
res
=>
{
this
.
submitFormList
[
1
].
options
=
res
.
data
this
.
submitStatusList
=
res
.
data
})
dictInfo
(
'approval_status'
).
then
(
res
=>
{
this
.
submitFormList
[
2
].
options
=
res
.
data
this
.
approvalStatusList
=
res
.
data
})
},
methods
:
{
reset
()
{
this
.
searchForm
=
{}
},
btnClick
(
pType
,
scope
)
{
console
.
log
(
scope
)
switch
(
pType
)
{
case
'submit'
:
this
.
$router
.
push
({
name
:
'addVehicle'
,
params
:
{
vehicleId
:
scope
.
vehicleId
,
url
:
'submit'
}
})
break
}
},
...
...
src/views/vehicleSubmit/vehicleCheck/index.vue
View file @
5e31a2a
...
...
@@ -17,6 +17,7 @@
type=
"primary"
:size=
"btn_size"
icon=
"el-icon-refresh"
@
click=
"reset"
>
重置
</el-button>
</slot>
</search-form>
...
...
@@ -43,10 +44,11 @@
slot-scope=
"scope"
>
<el-button
v-if=
"scope.scope.approvalStatus == 1"
type=
"text"
@
click=
"btnClick('
submit
', scope.scope)"
@
click=
"btnClick('
check
', scope.scope)"
>
提交上牌资料
审核
</el-button>
</span>
</basic-table>
...
...
@@ -56,6 +58,7 @@
<
script
>
import
{
getCheckList
}
from
'services/vehicledoc'
import
{
dictInfo
}
from
'services/common'
export
default
{
data
()
{
return
{
...
...
@@ -71,14 +74,14 @@ export default {
{
label
:
'提交状态:'
,
type
:
'select'
,
prop
:
''
,
prop
:
'
submitStatus
'
,
placeholder
:
'请选择'
,
options
:
[]
},
{
label
:
'审核状态:'
,
type
:
'select'
,
prop
:
''
,
prop
:
'
approvalStatus
'
,
placeholder
:
'请选择'
,
options
:
[]
}
...
...
@@ -90,7 +93,7 @@ export default {
tableColumns
:
[
{
label
:
'所属大区'
,
prop
:
'
tempId
'
prop
:
'
area
'
},
{
label
:
'所属省'
,
prop
:
'province'
...
...
@@ -108,7 +111,7 @@ export default {
prop
:
'shopLevel'
},
{
label
:
'车辆类型'
,
prop
:
'
shopLevel
'
prop
:
'
vehicleType
'
},
{
label
:
'车架号'
,
prop
:
'vin'
...
...
@@ -120,36 +123,60 @@ export default {
prop
:
'configDesc'
},
{
label
:
'外色'
,
prop
:
'
sns
'
prop
:
'
color
'
},
{
label
:
'内色'
,
prop
:
'in
stalledTime
'
prop
:
'in
nerColor
'
},
{
label
:
'提交时间'
,
prop
:
'
installed
Time'
prop
:
'
submit
Time'
},
{
label
:
'销售经理'
,
prop
:
'
installedTime
'
prop
:
'
saleManager
'
},
{
label
:
'销售经理电话'
,
prop
:
'
installedTim
e'
prop
:
'
saleManagerPhon
e'
},
{
label
:
'上牌备注'
,
prop
:
'installedTime'
prop
:
'velRemark'
},
{
label
:
'审核结果'
,
prop
:
'approvalResult'
},
{
label
:
'
审核结果
备注'
,
prop
:
'
installedTime
'
label
:
'备注'
,
prop
:
'
remark
'
}
]
},
getListApi
:
getCheckList
,
submitStatusList
:
[],
approvalStatusList
:
[]
}
},
watch
:
{
'$router'
(
val
)
{
console
.
log
(
val
)
}
},
mounted
()
{
dictInfo
(
'submitStatus'
).
then
(
res
=>
{
this
.
checkFormList
[
1
].
options
=
res
.
data
this
.
submitStatusList
=
res
.
data
})
dictInfo
(
'approval_status'
).
then
(
res
=>
{
this
.
checkFormList
[
2
].
options
=
res
.
data
this
.
approvalStatusList
=
res
.
data
})
},
methods
:
{
reset
()
{
this
.
searchForm
=
{}
},
btnClick
(
pType
,
scope
)
{
console
.
log
(
scope
)
switch
(
pType
)
{
case
'
submit
'
:
this
.
$router
.
push
({
name
:
'addVehicle'
})
case
'
check
'
:
this
.
$router
.
push
({
name
:
'addVehicle'
,
params
:
{
vehicleId
:
scope
.
vehicleId
,
approvalId
:
scope
.
approvalId
,
url
:
'check'
}
})
break
}
},
...
...
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