Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 b9e39214
authored
Jan 26, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
预录客户-车架号,车型
1 parent
0ecd4aa1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
44 deletions
src/components/d2-table-header/index.vue
src/views/customer/editCustomer.vue
src/components/d2-table-header/index.vue
View file @
b9e3921
<
template
>
<
template
>
<el-row
class=
"table-header"
>
<el-row
class=
"table-header"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<d2-el-icon
name=
"s-grid"
class=
"grid"
/>
<span
v-text=
"title"
></span>
<span
v-text=
"title"
></span>
<slot
name=
"left"
></slot>
<slot
name=
"left"
></slot>
</el-col>
</el-col>
...
...
src/views/customer/editCustomer.vue
View file @
b9e3921
...
@@ -195,7 +195,6 @@
...
@@ -195,7 +195,6 @@
v-if=
"form.carChildsBrandId"
v-if=
"form.carChildsBrandId"
v-model=
"form.carSeriesId"
v-model=
"form.carSeriesId"
placeholder=
"请选择车系"
placeholder=
"请选择车系"
@
change=
"getCarType(form.carSeriesId)"
style=
"width:150px; margin-right: 20px;"
style=
"width:150px; margin-right: 20px;"
>
>
<el-option
<el-option
...
@@ -205,7 +204,7 @@
...
@@ -205,7 +204,7 @@
:label=
"item.carSeriesName"
:label=
"item.carSeriesName"
/>
/>
</el-select>
</el-select>
<el-select
<
!--
<
el-select
v-if=
"form.carSeriesId"
v-if=
"form.carSeriesId"
v-model=
"form.carTypeId"
v-model=
"form.carTypeId"
placeholder=
"请选择车型"
placeholder=
"请选择车型"
...
@@ -218,7 +217,7 @@
...
@@ -218,7 +217,7 @@
:value=
"item.id"
:value=
"item.id"
:label=
"item.name"
:label=
"item.name"
/>
/>
</el-select>
</el-select>
-->
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"车架号:"
label=
"车架号:"
...
@@ -232,6 +231,7 @@
...
@@ -232,6 +231,7 @@
placeholder=
"请输入车架号"
placeholder=
"请输入车架号"
clearable
clearable
/>
/>
<p
class=
"tips"
>
完整的车架号是17位的车辆识别代码(VIN码)
</p>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"钥匙号:"
label=
"钥匙号:"
...
@@ -346,7 +346,7 @@
...
@@ -346,7 +346,7 @@
import
_
from
'lodash'
import
_
from
'lodash'
import
{
Util
}
from
'@/common/util'
import
{
Util
}
from
'@/common/util'
import
util
from
'@/libs/util'
import
util
from
'@/libs/util'
import
{
getServiceStore
,
getParkStore
,
getStaff
,
getCarInfo
,
get
CarType
,
get
Goods
,
addOrder
,
editOrder
}
from
'@api/editCustomer'
import
{
getServiceStore
,
getParkStore
,
getStaff
,
getCarInfo
,
getGoods
,
addOrder
,
editOrder
}
from
'@api/editCustomer'
import
{
BaseData
}
from
'@/common/constants.js'
import
{
BaseData
}
from
'@/common/constants.js'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
export
default
{
export
default
{
...
@@ -361,15 +361,15 @@ export default {
...
@@ -361,15 +361,15 @@ export default {
}
}
function
checkContacts
(
rule
,
value
,
callback
)
{
function
checkContacts
(
rule
,
value
,
callback
)
{
if
(
value
)
{
if
(
value
)
{
if
(
value
.
length
!=
17
)
{
// if (value.length != 17) {
callback
(
new
Error
(
'车架号必须为17位数字或字符'
))
// callback(new Error('车架号必须为17位数字或字符'))
// return false
// } else {
if
(
Util
.
validationInput
(
value
))
{
callback
(
new
Error
(
'车架号必须为数字或字符'
))
return
false
return
false
}
else
{
if
(
Util
.
validationInput
(
value
))
{
callback
(
new
Error
(
'车架号必须为17位数字或字符'
))
return
false
}
}
}
// }
}
}
callback
()
callback
()
}
}
...
@@ -398,7 +398,7 @@ export default {
...
@@ -398,7 +398,7 @@ export default {
carBrandOptions
:
[],
carBrandOptions
:
[],
carSmallBrandOptions
:
[],
carSmallBrandOptions
:
[],
carSeriesOptions
:
[],
carSeriesOptions
:
[],
carTypeOptions
:
[],
//
carTypeOptions: [],
goodsType
:
''
,
goodsType
:
''
,
productTypeList
:
[],
productTypeList
:
[],
TB_height
:
90
,
TB_height
:
90
,
...
@@ -471,9 +471,9 @@ export default {
...
@@ -471,9 +471,9 @@ export default {
this
.
form
.
carChildsBrandId
=
this
.
$route
.
params
.
form
.
carChildsBrandId
this
.
form
.
carChildsBrandId
=
this
.
$route
.
params
.
form
.
carChildsBrandId
this
.
$route
.
params
.
form
.
carSeriesId
&&
this
.
changeCarSmallBrand
(
this
.
form
.
carChildsBrandId
,
()
=>
{
this
.
$route
.
params
.
form
.
carSeriesId
&&
this
.
changeCarSmallBrand
(
this
.
form
.
carChildsBrandId
,
()
=>
{
this
.
form
.
carSeriesId
=
this
.
$route
.
params
.
form
.
carSeriesId
this
.
form
.
carSeriesId
=
this
.
$route
.
params
.
form
.
carSeriesId
this
.
$route
.
params
.
form
.
carTypeId
&&
this
.
getCarType
(
this
.
form
.
carSeriesId
,
()
=>
{
//
this.$route.params.form.carTypeId && this.getCarType(this.form.carSeriesId, () => {
this
.
form
.
carTypeId
=
this
.
$route
.
params
.
form
.
carTypeId
//
this.form.carTypeId = this.$route.params.form.carTypeId
})
//
})
})
})
})
})
})
})
...
@@ -563,7 +563,7 @@ export default {
...
@@ -563,7 +563,7 @@ export default {
this
.
carSmallBrandOptions
=
[]
this
.
carSmallBrandOptions
=
[]
this
.
$set
(
this
.
form
,
'carChildsBrandId'
,
''
)
this
.
$set
(
this
.
form
,
'carChildsBrandId'
,
''
)
this
.
$set
(
this
.
form
,
'carSeriesId'
,
''
)
this
.
$set
(
this
.
form
,
'carSeriesId'
,
''
)
this
.
$set
(
this
.
form
,
'carTypeId'
,
''
)
//
this.$set(this.form, 'carTypeId', '')
for
(
var
i
=
0
;
i
<
this
.
carInfoList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
carInfoList
.
length
;
i
++
)
{
if
(
this
.
carInfoList
[
i
].
carBrandId
==
id
)
{
if
(
this
.
carInfoList
[
i
].
carBrandId
==
id
)
{
this
.
carSmallBrandOptions
.
push
(
this
.
carInfoList
[
i
])
this
.
carSmallBrandOptions
.
push
(
this
.
carInfoList
[
i
])
...
@@ -583,7 +583,7 @@ export default {
...
@@ -583,7 +583,7 @@ export default {
// 获取车系
// 获取车系
changeCarSmallBrand
(
id
,
fn
=
()
=>
{
})
{
changeCarSmallBrand
(
id
,
fn
=
()
=>
{
})
{
this
.
$set
(
this
.
form
,
'carSeriesId'
,
''
)
this
.
$set
(
this
.
form
,
'carSeriesId'
,
''
)
this
.
$set
(
this
.
form
,
'carTypeId'
,
''
)
//
this.$set(this.form, 'carTypeId', '')
this
.
carSeriesOptions
=
[]
this
.
carSeriesOptions
=
[]
for
(
var
i
=
0
;
i
<
this
.
carInfoList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
carInfoList
.
length
;
i
++
)
{
if
(
this
.
carInfoList
[
i
].
carChildsBrandId
==
id
)
{
if
(
this
.
carInfoList
[
i
].
carChildsBrandId
==
id
)
{
...
@@ -604,25 +604,25 @@ export default {
...
@@ -604,25 +604,25 @@ export default {
},
},
// 根据车系id获取车辆类型
// 根据车系id获取车辆类型
getCarType
(
id
,
fn
=
()
=>
{
})
{
//
getCarType(id, fn = () => { }) {
this
.
$set
(
this
.
form
,
'carTypeId'
,
''
)
//
this.$set(this.form, 'carTypeId', '')
this
.
carTypeOptions
=
[]
//
this.carTypeOptions = []
if
(
id
)
{
//
if (id) {
const
params
=
{
'seriesId'
:
id
}
//
const params = { 'seriesId': id }
getCarType
(
params
).
then
(
res
=>
{
//
getCarType(params).then(res => {
this
.
carTypeOptions
=
res
||
[]
//
this.carTypeOptions = res || []
const
o
=
this
.
carSeriesOptions
.
find
(
k
=>
k
.
carSeriesId
==
id
)
//
const o = this.carSeriesOptions.find(k => k.carSeriesId == id)
this
.
form
.
carSeriesName
=
o
.
carSeriesName
//
this.form.carSeriesName = o.carSeriesName
})
//
})
fn
()
//
fn()
}
//
}
},
//
},
changeCarType
(
id
)
{
//
changeCarType(id) {
const
o
=
this
.
carTypeOptions
.
find
(
k
=>
k
.
id
==
id
)
//
const o = this.carTypeOptions.find(k => k.id == id)
this
.
form
.
carTypeName
=
o
.
name
//
this.form.carTypeName = o.name
},
//
},
searchGoods
()
{
searchGoods
()
{
/** 根据门店商户号获取基础商品列表 */
/** 根据门店商户号获取基础商品列表 */
...
@@ -720,10 +720,10 @@ export default {
...
@@ -720,10 +720,10 @@ export default {
customer
.
carSeriesId
=
this
.
form
.
carSeriesId
customer
.
carSeriesId
=
this
.
form
.
carSeriesId
customer
.
carSeriesName
=
this
.
form
.
carSeriesName
customer
.
carSeriesName
=
this
.
form
.
carSeriesName
}
}
if
(
this
.
form
.
carTypeId
)
{
//
if (this.form.carTypeId) {
customer
.
carTypeId
=
this
.
form
.
carTypeId
//
customer.carTypeId = this.form.carTypeId
customer
.
carTypeName
=
this
.
form
.
carTypeName
//
customer.carTypeName = this.form.carTypeName
}
//
}
if
(
this
.
form
.
carKeyNo
)
{
if
(
this
.
form
.
carKeyNo
)
{
customer
.
carKeyNo
=
this
.
form
.
carKeyNo
customer
.
carKeyNo
=
this
.
form
.
carKeyNo
}
}
...
...
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