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 1d9ef990
authored
Sep 24, 2021
by
吴娟华
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
'1.2.1'
1 parent
b36a4e46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
58 deletions
src/views/reportManage/outStore.vue
src/views/vehicleManage/index.vue
src/views/vehicleManage/userList.vue
src/views/vehicleManage/vehicleList.vue
src/views/reportManage/outStore.vue
View file @
1d9ef99
...
...
@@ -159,7 +159,7 @@ export default {
},
btnClick
(
type
,
scope
)
{
this
.
$Common
.
exportExcel
({
url
:
`
${
store
.
state
.
baseURL
}
${
REPORT_API
.
REPORT_EXPORT
}
`
,
url
:
`
${
store
.
state
.
baseURL
}
/trialdrive/notinstorereport/export
`
,
method
:
'GET'
,
data
:
this
.
searchDataForm
,
fileName
:
'无在店统计报表'
+
moment
().
format
(
'YYYY.MM.DD'
)
...
...
src/views/vehicleManage/index.vue
View file @
1d9ef99
...
...
@@ -22,7 +22,7 @@
</basic-table>
<basic-dialog
:title=
"vehicleTitle"
:isVisible=
"vehicleVisible"
:hasOk=
"vehicleHasOk"
@
confirmDialog=
"handleConfirm('create')"
@
closeDialog=
"handleClose('create')"
>
<slot>
<rule-form
:ruleForm=
"vehicleForm"
:rules=
"vehicleRules"
:ruleData=
"vehicleData"
:labelWidth=
"'120px'"
ref=
'vehicleRuleForm'
></rule-form>
<rule-form
v-loading=
"formLoading"
:ruleForm=
"vehicleForm"
:rules=
"vehicleRules"
:ruleData=
"vehicleData"
:labelWidth=
"'120px'"
ref=
'vehicleRuleForm'
></rule-form>
</slot>
</basic-dialog>
<!-- 导入 -->
...
...
@@ -288,8 +288,8 @@ export default {
prop
:
"serveType"
,
type
:
"select"
,
options
:
[
{
label
:
"未上牌"
,
value
:
"0"
},
{
label
:
"已上牌"
,
value
:
"1"
},
{
label
:
"未上牌"
,
value
:
0
},
{
label
:
"已上牌"
,
value
:
1
},
],
clearable
:
true
,
},
...
...
@@ -349,8 +349,8 @@ export default {
prop
:
"serveType"
,
type
:
"select"
,
options
:
[
{
label
:
"未上牌"
,
value
:
"0"
},
{
label
:
"已上牌"
,
value
:
"1"
},
{
label
:
"未上牌"
,
value
:
0
},
{
label
:
"已上牌"
,
value
:
1
},
],
clearable
:
true
,
},
...
...
@@ -403,6 +403,8 @@ export default {
userArr
:[],
userData
:[],
userListModalVisible
:
false
,
formLoading
:
false
,
isViewMode
:
false
,
};
},
watch
:
{
...
...
@@ -416,7 +418,9 @@ export default {
}
},
mounted
()
{
this
.
getModels
();
this
.
vehicleListPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
getModels
(
resolve
);
})
dictInfo
(
"trialdrive_vehicle_model"
).
then
((
res
)
=>
{
this
.
vehicleData
.
find
((
item
)
=>
item
.
prop
==
"modelId"
).
options
=
res
.
data
;
...
...
@@ -483,62 +487,89 @@ export default {
this
.
$refs
.
vehicleRuleForm
.
$children
[
0
].
clearValidate
();
break
;
case
"edit"
:
this
.
formLoading
=
true
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
isReadonly
=
false
;
if
(
this
.
vehicleVisible
)
{
//let _list = this.vehicleDefalutData;
this
.
vehicleTitle
=
"编辑车辆"
;
this
.
vehicleHasOk
=
true
;
this
.
isViewMode
=
false
this
.
vehicleListPromise
.
then
(()
=>
{
if
(
this
.
vehicleVisible
)
{
//let _list = this.vehicleDefalutData;
this
.
vehicleTitle
=
"编辑车辆"
;
this
.
vehicleHasOk
=
true
;
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
((
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
false
);
});
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
((
k
)
=>
{
if
(
k
.
prop
==
'vin'
||
k
.
prop
==
'sn'
||
k
.
prop
==
'shopName'
)
{
this
.
$set
(
k
,
"disabled"
,
true
);
}
else
{
this
.
$set
(
k
,
"disabled"
,
false
);
}
});
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleArr
.
forEach
((
item
)
=>
{
if
(
item
==
"serveType"
)
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]
+
""
);
else
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
});
this
.
vehicleForm
.
tempId
=
data
.
id
;
}
});
}
this
.
vehicleArr
.
forEach
((
item
)
=>
{
if
(
item
==
"serveType"
)
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
else
{
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
if
(
item
==
'brandId'
)
{
this
.
changeCarBrand
(
data
.
brandId
,
true
)
}
}
});
this
.
vehicleForm
.
tempId
=
data
.
id
;
this
.
formLoading
=
false
}
});
}
})
break
;
case
"view"
:
console
.
log
(
"view"
);
this
.
formLoading
=
true
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
isReadonly
=
true
;
if
(
this
.
vehicleVisible
)
{
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
((
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
true
);
});
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
isViewMode
=
true
this
.
vehicleListPromise
.
then
(()
=>
{
if
(
this
.
vehicleVisible
)
{
infoVehicle
({
tempId
:
scope
.
tempId
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
((
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
true
);
});
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleArr
.
forEach
((
item
)
=>
{
if
(
item
==
"serveType"
)
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]
+
""
);
else
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
});
}
});
this
.
vehicleTitle
=
"查看车辆"
;
this
.
vehicleHasOk
=
false
;
//this.vehicleData.map((item) => this.$set(item, "disabled", true));
// if (item.type == 'input') this.$set(item, 'readonly', true)
// else this.$set(item, 'disabled', true)
// })
}
this
.
vehicleArr
.
forEach
((
item
)
=>
{
if
(
item
==
"serveType"
)
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
else
{
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
if
(
item
==
'brandId'
)
{
this
.
changeCarBrand
(
data
.
brandId
,
'view'
)
}
}
});
}
});
this
.
vehicleTitle
=
"查看车辆"
;
this
.
vehicleHasOk
=
false
;
this
.
formLoading
=
false
//this.vehicleData.map((item) => this.$set(item, "disabled", true));
// if (item.type == 'input') this.$set(item, 'readonly', true)
// else this.$set(item, 'disabled', true)
// })
}
})
break
;
case
"delete"
:
this
.
$confirm
(
"是否要删除?"
,
"提示"
,
{
...
...
@@ -598,6 +629,7 @@ export default {
url
:
`
${
store
.
state
.
baseURL
}${
VEHICLE_API
.
VEHICLE_EXPORT
}
`
,
method
:
"GET"
,
data
:
this
.
searchForm
,
fileName
:
'试驾车辆列表'
+
moment
().
format
(
'YYYY.MM.DD'
)
});
break
;
case
"chooseVehicle"
:
...
...
@@ -682,6 +714,7 @@ export default {
},
// 特约店弹窗
selectStore
()
{
return
if
(
this
.
isReadonly
)
return
;
this
.
filterText
=
""
;
this
.
filterDialogTitle
=
"选择特约店"
;
...
...
@@ -753,7 +786,7 @@ export default {
},
// 获取车辆数据
getModels
()
{
getModels
(
resolve
)
{
let
_this
=
this
;
GETVEHICLETREE
().
then
((
res
)
=>
{
if
(
res
.
code
!=
200
)
{
...
...
@@ -764,11 +797,12 @@ export default {
let
m
=
o
.
find
((
k
)
=>
k
.
prop
==
"brandId"
);
m
.
options
=
_list
;
_this
.
vehicleList
=
_list
;
resolve
()
});
},
// 监听车型选择
changeCarBrand
(
e
)
{
changeCarBrand
(
e
,
flag
)
{
let
list
=
this
.
vehicleDefalutData
;
let
m
=
this
.
vehicleList
;
let
o
=
m
.
find
((
k
)
=>
k
.
id
==
e
);
...
...
@@ -793,6 +827,29 @@ export default {
}
else
{
list
.
splice
(
idx
+
1
,
0
,
n
);
}
if
(
flag
)
{
let
row
=
list
.
find
((
item
)
=>
item
.
prop
===
'seriesId'
)
setTimeout
(()
=>
{
let
id
=
this
.
vehicleForm
.
typeId
this
.
changeCarModel
(
this
.
vehicleForm
.
seriesId
,
row
)
this
.
vehicleForm
.
typeId
=
id
},
500
)
}
list
.
map
((
k
)
=>
{
if
(
flag
==
'view'
)
{
this
.
$set
(
k
,
"disabled"
,
true
);
}
else
{
if
(
k
.
prop
==
'vin'
||
k
.
prop
==
'sn'
||
k
.
prop
==
'shopName'
)
{
this
.
$set
(
k
,
"disabled"
,
true
);
}
else
{
this
.
$set
(
k
,
"disabled"
,
false
);
}
}
});
this
.
$set
(
this
,
"vehicleDefalutData"
,
list
);
this
.
vehicleData
=
_
.
cloneDeep
(
list
);
delete
this
.
vehicleForm
.
seriesId
;
...
...
@@ -834,6 +891,17 @@ export default {
}
else
{
list
.
splice
(
idx
+
1
,
0
,
n
);
}
list
.
map
((
k
)
=>
{
if
(
k
.
prop
===
'typeId'
)
{
if
(
this
.
isViewMode
){
this
.
$set
(
k
,
'disabled'
,
true
)
}
else
{
this
.
$set
(
k
,
'disabled'
,
false
)
}
}
});
this
.
$set
(
this
,
"vehicleDefalutData"
,
list
);
this
.
vehicleData
=
_
.
cloneDeep
(
list
);
delete
this
.
vehicleForm
.
typeId
;
...
...
src/views/vehicleManage/userList.vue
View file @
1d9ef99
...
...
@@ -113,7 +113,7 @@
<el-button
size=
"small"
class=
"pull-right"
@
click=
"highSearch
Visible = false
"
@
click=
"highSearch
Cancel
"
>
取消
</el-button
>
<el-button
...
...
@@ -656,8 +656,8 @@ export default {
});
},
filterConfirm
()
{
const
{
label
,
id
,
childre
n
}
=
this
.
$refs
.
tree
.
getCurrentNode
();
if
(
children
)
{
const
{
label
,
id
,
origi
n
}
=
this
.
$refs
.
tree
.
getCurrentNode
();
if
(
origin
.
type
!=
"u"
)
{
this
.
$message
({
message
:
"请选择下级所属组织"
,
type
:
"error"
,
...
...
@@ -678,6 +678,10 @@ export default {
this
.
highSearchVisible
=
true
}
},
highSearchCancel
()
{
this
.
filterVisible
=
false
this
.
highSearchVisible
=
false
},
},
components
:
{
InfiniteLoading
,
...
...
src/views/vehicleManage/vehicleList.vue
View file @
1d9ef99
...
...
@@ -385,6 +385,7 @@ export default {
pType
:
"view"
,
},
],
align
:
'left'
,
},
},
getListApi
:
getVehicleList
,
...
...
@@ -1007,6 +1008,7 @@ export default {
url
:
`
${
store
.
state
.
baseURL
}
/trialdrive/vehicle/vehicleinfo/export`
,
method
:
"GET"
,
data
:
this
.
searchForm
,
fileName
:
'车辆管理'
+
moment
().
format
(
'YYYY.MM.DD'
)
});
break
;
case
"freq"
:
...
...
@@ -1223,6 +1225,7 @@ export default {
}
this
.
$set
(
this
.
vehicleForm
,
"organizationName"
,
label
);
this
.
vehicleForm
.
organizationId
=
id
;
this
.
$refs
.
vehicleRuleForm
.
$children
[
0
].
validateField
(
'organizationName'
)
this
.
closeFilter
();
},
filterNode
(
value
,
data
)
{
...
...
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