Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
1680c461
Commit
1680c461
authored
Sep 09, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
01359636
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
28 deletions
+30
-28
edit.vue
pages/crm/customer/edit.vue
+30
-28
No files found.
pages/crm/customer/edit.vue
View file @
1680c461
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isInform')"
prop=
"isInform"
>
<FormItem
:label=
"l('isInform')"
prop=
"isInform"
>
<Dictionary
code=
"crm.customer.isInform"
v-model=
"entity.isInform"
type=
"radio"
></Dictionary>
<Dictionary
code=
"crm.customer.isInform"
v-model=
"entity.isInform"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -74,64 +74,66 @@
...
@@ -74,64 +74,66 @@
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
}
,
}
}
;
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
disabled
=
true
;
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
)
})
});
}
else
{
this
.
disabled
=
false
;
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'Customer'
+
'.'
+
key
key
=
"Customer"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
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