Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f0855a6f
authored
Apr 09, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
1f07588e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
pages/informationEntry/informationEntry.vue
pages/informationEntry/informationEntry.vue
View file @
f0855a6
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-07 14:54:28
* @LastEditors: huyue
* @LastEditTime: 2024-04-09
19:22:47
* @LastEditTime: 2024-04-09
20:18:12
-->
<
template
>
<view
class=
"information-entry"
>
...
...
@@ -53,20 +53,22 @@
:popupH=
"820"
>
<view
name=
"content"
>
<view
class=
"pop-tips"
<view
class=
"error-tip"
v-if=
"errorTip"
>
以下信息不能为空,请完善信息后保存
</view>
<view
class=
"pop-tips"
v-else
>
检测到“交车通知书”中未填写客户档案,请填写后再完成接待。
</view
>
<view
class=
"form"
>
<view
class=
"form"
:key=
"f_key"
>
<template
v-for=
"(i, index) in formObject"
>
<view
class=
"form-item"
:key=
"index"
>
<view
class=
"label"
>
{{
i
.
label
}}
</view>
<view
:class=
"['value',
{error:i.error}]">
<view
:class=
"['value',
{error:
i.error}]">
<template
v-if=
"i.type == 'input'"
>
<input
:type=
"i.inputType"
:maxlength=
"i.maxlength"
v-model=
"formData[i.key]"
class=
"input"
@
blur=
"blur(i.key)"
/>
</
template
>
<
template
v-else
>
...
...
@@ -198,6 +200,8 @@ export default {
employeeBoxVisible
:
false
,
carlist
:
[],
employeeList
:
[],
f_key
:
Date
.
now
(),
errorTip
:
false
};
},
onLoad
(
options
)
{
...
...
@@ -206,6 +210,8 @@ export default {
title
:
text
,
});
this
.
$store
.
dispatch
(
"getCustomerInfo"
).
then
((
customerInfo
)
=>
{
console
.
log
(
customerInfo
,
' ======='
)
this
.
formData
=
customerInfo
this
.
isPass
=
Object
.
values
(
customerInfo
).
every
((
value
)
=>
!!
value
);
});
...
...
@@ -268,12 +274,17 @@ export default {
// this.messageBoxVisible = false;
try
{
for
(
let
i
in
this
.
formData
)
{
if
(
!
this
.
formData
[
i
])
throw
i
if
(
!
this
.
formData
[
i
]
&&
i
!=
'salesUuid'
)
throw
i
}
}
catch
(
error
)
{
this
.
formData
[
i
].
error
=
true
console
.
log
(
error
)
this
.
formObject
.
find
(
item
=>
item
.
key
==
error
).
error
=
true
console
.
log
(
this
.
formObject
)
this
.
f_key
=
Date
.
now
()
this
.
errorTip
=
true
// this.formObject[error].error = true
}
this
.
stopAudio
();
//
this.stopAudio();
},
// 选择车型与销售
showPop
(
key
)
{
...
...
@@ -298,10 +309,19 @@ export default {
}
else
this
.
formData
.
carModel
=
item
.
name
;
this
.
$store
.
dispatch
(
"setCustomerInfo"
,
this
.
formData
);
console
.
log
(
this
.
formData
)
this
.
formObject
.
map
(
item
=>
item
.
error
=
false
)
this
.
f_key
=
Date
.
now
()
this
.
errorTip
=
false
},
showPopup
(
e
)
{
this
[
e
]
=
true
;
},
blur
(
popkey
)
{
console
.
log
(
popkey
)
this
.
formObject
.
find
(
item
=>
item
.
key
==
popkey
).
error
=
false
this
.
f_key
=
Date
.
now
()
this
.
errorTip
=
false
}
},
};
</
script
>
...
...
@@ -401,6 +421,14 @@ export default {
margin-top
:
30
rpx
;
text-align
:
center
;
}
.error-tip
{
font-size
:
28
rpx
;
padding
:
32
rpx
60
rpx
24
rpx
;
margin-top
:
30
rpx
;
text-align
:
center
;
background-color
:
rgb
(
254
,
237
,
234
);
color
:
#f45c3d
;
}
.form
{
display
:
flex
;
flex-wrap
:
wrap
;
...
...
@@ -435,6 +463,9 @@ export default {
margin-left
:
32
rpx
;
box-sizing
:
border-box
;
padding
:
0
40
rpx
;
&.error
{
border
:
2
rpx
solid
#F24724
;
}
.input
,
.select
{
width
:
100%
;
...
...
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