Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
2ccb891c
Commit
2ccb891c
authored
Dec 20, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a22c66c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
12 deletions
+32
-12
customerEdit-form.vue
src/components/sale/customerEdit-form.vue
+32
-12
No files found.
src/components/sale/customerEdit-form.vue
View file @
2ccb891c
...
...
@@ -112,8 +112,8 @@
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.ContactNumber"
lazy-rules
ref=
"ContactNumber"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
:rules=
"[ val => validateTel(val) || '请输入正确的11位号码']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.ContactNumber"
lazy-rules
ref=
"ContactNumber"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"联系电话"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"40"
v-model=
"objOption.EnterpriseName"
:label=
"EnterpriseLabelName"
>
...
...
@@ -129,8 +129,8 @@
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.QQ"
ref=
"QQ"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"QQ"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model
:number
=
"objOption.QQ"
ref=
"QQ"
type=
"number"
:min=
"0"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"QQ"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.WeChatNo"
ref=
"wechat"
...
...
@@ -145,11 +145,11 @@
<div
class=
"col-6"
>
<!-- <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Account" ref="Account"
class="col-6 q-pr-lg q-pb-lg" label="账号" /> -->
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Address"
ref=
"Address"
class=
"col-6 q-pr-lg q-pb-lg
"
label=
"详细地址"
/>
<q-input
filled
stack-label
:dense=
"false"
v-model=
"objOption.Address"
ref=
"Address
"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"详细地址"
/>
</div>
<div
class=
"col-6"
>
</div>
</div>
<div
class=
"row wrap"
>
...
...
@@ -195,7 +195,9 @@
SetCustomer
,
GetCustomer
}
from
"../../api/sale/peemanagement"
;
import
{
validateTel
}
from
'../../utils/validate'
import
{
validateTel
}
from
'../../utils/validate'
export
default
{
components
:
{},
props
:
{
...
...
@@ -215,7 +217,7 @@
Sex
:
1
,
//性别(1-男,2-女)
Fax
:
""
,
//传真
QQ
:
""
,
WeChatNo
:
""
,
//微信
WeChatNo
:
""
,
//微信
Email
:
""
,
//邮箱
Address
:
''
,
//详细地址
Images
:
""
,
//营业照片
...
...
@@ -254,7 +256,7 @@
created
()
{},
mounted
()
{
this
.
initObj
()
console
.
log
(
"sss"
,
this
.
customerObj
)
console
.
log
(
"sss"
,
this
.
customerObj
)
},
methods
:
{
//初始化表单
...
...
@@ -310,9 +312,27 @@
//保存
saveCourse
()
{
this
.
$refs
.
CustomerName
.
validate
();
this
.
$refs
.
ContactNumber
.
validate
();
//
this.$refs.ContactNumber.validate();
this
.
$refs
.
Address
.
validate
();
if
(
!
this
.
$refs
.
CustomerName
.
hasError
&&
!
this
.
$refs
.
ContactNumber
.
hasError
&&
!
this
.
$refs
.
Address
.
hasError
)
{
if
(
!
this
.
objOption
.
ContactNumber
&&
!
this
.
objOption
.
QQ
&&
!
this
.
objOptionWeChatNo
)
{
this
.
$q
.
notify
({
type
:
'warning'
,
message
:
"电话,qq,微信至少填写一个"
,
timeout
:
2000
,
position
:
"top"
,
});
return
}
if
(
this
.
objOption
.
ContactNumber
&&
!
validateTel
(
this
.
objOption
.
ContactNumber
)){
this
.
$q
.
notify
({
type
:
'warning'
,
message
:
"请输入正确的11位号码"
,
timeout
:
2000
,
position
:
"top"
,
});
return
}
if
(
!
this
.
$refs
.
CustomerName
.
hasError
&&
!
this
.
$refs
.
Address
.
hasError
)
{
this
.
saveCustomLoading
=
true
;
SetCustomer
(
this
.
objOption
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment