Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
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
bp
op-web-service
Commits
a9f0957c
Commit
a9f0957c
authored
Jun 16, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:企业信息修改
parent
30915f55
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
45 deletions
+46
-45
enterpriseForm.vue
src/pages/Enterprise/components/enterpriseForm.vue
+46
-45
No files found.
src/pages/Enterprise/components/enterpriseForm.vue
View file @
a9f0957c
...
...
@@ -189,7 +189,6 @@ export default {
callback
(
new
Error
(
"请上传营业执照"
));
}
else
{
callback
();
}
callback
();
};
...
...
@@ -358,7 +357,7 @@ export default {
// 上传身份证后面
handleBackSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"bakImgRef"
)
this
.
clearValidate
(
"bakImgRef"
)
;
this
.
establishForm
.
bakImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
bak_img
=
res
.
result
.
object_id
;
},
...
...
@@ -371,30 +370,21 @@ export default {
// 提交表单
handelSubmit
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
console
.
log
(
valid
);
if
(
valid
)
{
if
(
this
.
enterpriseId
&&
!
this
.
establishForm
.
sensitiveWord
)
return
this
.
$message
.
error
(
"您无敏感词权限修改信息!!!"
);
if
(
valid
)
{
// 企业信息提交参数
let
{
code
,
name
,
entterprise_image
,
data_type
,
mobile
,
user_id
,
front_img
,
bak_img
,
idcard_number
,
name
:
userName
,
legal_mobile
mobile
}
=
this
.
establishForm
;
/**
* 第一步 企业信息提交(修改)
* @param enterpriseQuery
*/
console
.
log
(
"是否为修改的ID"
,
this
.
enterpriseId
);
// 提交
if
(
!
this
.
enterpriseId
)
{
const
enterpriseQuery
=
{
...
...
@@ -410,6 +400,8 @@ export default {
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
establishForm
.
enterprise_id
=
res
.
result
.
enterprise_auth_record_id
;
// 提交法人信息
this
.
uploadLegal
();
});
}
// 修改
...
...
@@ -431,15 +423,30 @@ export default {
data_from
:
3
,
mobile
};
console
.
log
(
"参数修改"
,
editQuery
);
opBusinessUpdate
(
editQuery
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
// 提交法人信息
this
.
uploadLegal
();
});
};
}
else
{
this
.
$message
.
error
(
"请按提示正确填写内容"
);
return
false
;
}
/**
* 第二步 法人(经营者信息提交)
*/
});
},
// 提交法人信息
uploadLegal
()
{
let
{
data_type
,
user_id
,
front_img
,
bak_img
,
idcard_number
,
userName
,
legal_mobile
}
=
this
.
establishForm
;
front_img
=
this
.
transformObjectId
(
front_img
);
bak_img
=
this
.
transformObjectId
(
bak_img
);
// 提交法人信息
...
...
@@ -457,7 +464,6 @@ export default {
legal_mobile
,
data_type
};
opCommit
(
legalQuery
).
then
(
result
=>
{
if
(
result
.
code
!==
0
)
return
this
.
$message
.
error
(
result
.
reason
);
this
.
$message
.
success
(
...
...
@@ -465,11 +471,6 @@ export default {
);
this
.
$router
.
replace
({
name
:
"Certification"
});
});
}
else
{
this
.
$message
.
error
(
"请按提示正确填写内容"
);
return
false
;
}
});
},
// 转换图片地址为ObjectId
...
...
@@ -487,7 +488,7 @@ export default {
// 清除校验
clearValidate
(
formName
)
{
this
.
$refs
[
formName
].
clearValidate
();
}
,
}
}
};
</
script
>
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