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
242d293a
Commit
242d293a
authored
Apr 01, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
0d8e82ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
add.vue
pages/crm/sales/add.vue
+42
-42
No files found.
pages/crm/sales/add.vue
View file @
242d293a
...
@@ -79,9 +79,9 @@
...
@@ -79,9 +79,9 @@
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
disabled
:
false
,
...
@@ -94,15 +94,15 @@ export default {
...
@@ -94,15 +94,15 @@ export default {
stage
:
1
stage
:
1
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
},
parms
:
{
parms
:
{
app
:
'Follow'
,
app
:
"Follow"
,
eid
:
null
,
eid
:
null
,
name
:
''
,
name
:
""
,
field
:
''
field
:
""
}
}
}
}
;
},
},
props
:
{
props
:
{
v
:
Object
,
v
:
Object
,
...
@@ -113,67 +113,67 @@ export default {
...
@@ -113,67 +113,67 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
parms
.
eid
=
this
.
$u
.
guid
()
this
.
parms
.
eid
=
this
.
$u
.
guid
()
;
this
.
$refs
.
refFile
.
intFiles
()
this
.
$refs
.
refFile
.
intFiles
()
;
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
entity
.
accessory
=
''
this
.
entity
.
accessory
=
""
;
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
let
nameList
=
this
.
$refs
.
refFile
.
nameList
let
nameList
=
this
.
$refs
.
refFile
.
nameList
;
let
names
=
[]
let
names
=
[]
;
nameList
.
forEach
(
(
e
)
=>
{
nameList
.
forEach
(
e
=>
{
names
.
push
(
e
.
fileName
)
names
.
push
(
e
.
fileName
)
;
})
})
;
this
.
entity
.
accessory
=
JSON
.
stringify
(
names
)
this
.
entity
.
accessory
=
JSON
.
stringify
(
names
)
.
replace
(
'['
,
''
)
.
replace
(
"["
,
""
)
.
replace
(
']'
,
''
)
.
replace
(
"]"
,
""
)
.
replace
(
/
\"
/g
,
''
)
//附件本地库暂存文件名称
.
replace
(
/
\"
/g
,
""
);
//附件本地库暂存文件名称
}
}
this
.
disabled
=
true
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
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
(
"保存失败"
);
}
}
this
.
$refs
.
refFile
.
intFiles
()
this
.
$refs
.
refFile
.
intFiles
();
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'Follow'
+
'.'
+
key
key
=
"Follow"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
},
},
watch
:
{
watch
:
{
'addId.projectId'
(
v
)
{
"addId.projectId"
(
v
)
{
if
(
v
>
0
)
{
if
(
v
>
0
)
{
this
.
entity
.
projectId
=
v
this
.
entity
.
projectId
=
v
;
}
}
},
},
'addId.customerId'
(
v
)
{
"addId.customerId"
(
v
)
{
if
(
v
>
0
)
{
if
(
v
>
0
)
{
this
.
entity
.
customerId
=
v
this
.
entity
.
customerId
=
v
;
}
}
},
},
'addId.principal'
(
v
)
{
"addId.principal"
(
v
)
{
this
.
entity
.
principal
=
v
this
.
entity
.
principal
=
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