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
ffba0da7
Commit
ffba0da7
authored
Jun 16, 2021
by
lvweichao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.yidian-inc.com:8021/bp/op-web-service
parents
772bf355
26ae4726
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
645 additions
and
619 deletions
+645
-619
package-lock.json
package-lock.json
+529
-529
index.vue
src/pages/Enterprise/Audit/index.vue
+1
-1
enterpriseForm.vue
src/pages/Enterprise/components/enterpriseForm.vue
+115
-89
No files found.
package-lock.json
View file @
ffba0da7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/pages/Enterprise/Audit/index.vue
View file @
ffba0da7
...
...
@@ -439,7 +439,7 @@ export default {
return
this
.
$message
.
error
(
"请填写审核意见"
);
const
res
=
await
postAudit
(
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
$message
.
warning
(
"
拒绝审核通过
成功!"
);
this
.
$message
.
warning
(
"
审核拒绝
成功!"
);
this
.
$router
.
replace
({
name
:
"Certification"
});
}
},
...
...
src/pages/Enterprise/components/enterpriseForm.vue
View file @
ffba0da7
...
...
@@ -29,7 +29,7 @@
<!-- 营业执照金山云key -->
<el-form-item
label=
"营业执照:"
ref=
"
licenseChange
"
ref=
"
entterpriseImageRef
"
prop=
"businessLicense"
>
<el-image
...
...
@@ -77,6 +77,7 @@
<!-- 身份证正面照片 -->
<el-form-item
label=
"经营者(法人)身份证正面照"
ref=
"frontImgRef"
prop=
"front_img"
>
<el-image
...
...
@@ -101,6 +102,7 @@
<!-- 身份证反面照片 -->
<el-form-item
label=
"经营者(法人)身份证反面照"
ref=
"bakImgRef"
prop=
"bak_img"
>
<el-image
...
...
@@ -187,12 +189,13 @@ export default {
callback
(
new
Error
(
"请上传营业执照"
));
}
else
{
callback
();
}
callback
();
};
// 身份证照片正面校验规则
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
establishForm
.
idcardFontPhoto
.
length
===
0
)
{
if
(
!
this
.
establishForm
.
front_img
)
{
callback
(
new
Error
(
"请上传身份正面证照片"
));
}
else
{
callback
();
...
...
@@ -201,7 +204,7 @@ export default {
};
// 身份证照片反面校验规则
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
establishForm
.
idcardBackPhoto
.
length
===
0
)
{
if
(
!
this
.
establishForm
.
bak_img
)
{
callback
(
new
Error
(
"请上传身份反面证照片"
));
}
else
{
callback
();
...
...
@@ -339,6 +342,7 @@ export default {
// 上传营业执照时
handleEnterpriseSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"entterpriseImageRef"
);
this
.
establishForm
.
entterpriseImage
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterprise_image
=
res
.
result
.
object_id
;
},
...
...
@@ -346,6 +350,7 @@ export default {
// 上传身份证前面
handleFontSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"frontImgRef"
);
this
.
establishForm
.
frontImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
front_img
=
res
.
result
.
object_id
;
},
...
...
@@ -353,6 +358,7 @@ export default {
// 上传身份证后面
handleBackSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"bakImgRef"
)
this
.
establishForm
.
bakImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
bak_img
=
res
.
result
.
object_id
;
},
...
...
@@ -363,94 +369,109 @@ export default {
},
// 提交表单
async
handelSubmit
()
{
if
(
this
.
enterpriseId
&&
!
this
.
establishForm
.
sensitiveWord
)
return
this
.
$message
.
error
(
"您无敏感词权限修改信息!!!"
);
handelSubmit
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
console
.
log
(
valid
);
if
(
valid
)
{
if
(
this
.
enterpriseId
&&
!
this
.
establishForm
.
sensitiveWord
)
return
this
.
$message
.
error
(
"您无敏感词权限修改信息!!!"
);
// 企业信息提交参数
let
{
code
,
name
,
entterprise_image
,
data_type
,
mobile
,
user_id
,
front_img
,
bak_img
,
idcard_number
,
name
:
userName
,
legal_mobile
,
}
=
this
.
establishForm
;
/**
* 第一步 企业信息提交(修改)
* @param enterpriseQuery
*/
console
.
log
(
"是否为修改的ID"
,
this
.
enterpriseId
);
// 提交
if
(
!
this
.
enterpriseId
)
{
const
enterpriseQuery
=
{
code
,
name
,
entterprise_image
,
data_from
:
3
,
data_type
,
mobile
,
proxy_user_name
:
this
.
$store
.
state
.
userInfo
.
email
};
const
res
=
await
postBusiness
(
enterpriseQuery
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
establishForm
.
enterprise_id
=
res
.
result
.
enterprise_auth_record_id
;
}
// 修改
else
{
let
{
code
,
name
,
entterprise_image
,
data_type
,
mobile
}
=
this
.
establishForm
;
entterprise_image
=
this
.
transformObjectId
(
entterprise_image
);
const
editQuery
=
{
record_id
:
this
.
enterpriseId
,
code
,
name
,
entterprise_image
,
data_type
,
data_from
:
3
,
mobile
};
console
.
log
(
"参数修改"
,
editQuery
);
const
res
=
await
opBusinessUpdate
(
editQuery
);
console
.
log
(
res
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
}
/**
* 第二步 法人(经营者信息提交)
*/
front_img
=
this
.
transformObjectId
(
front_img
);
bak_img
=
this
.
transformObjectId
(
bak_img
);
// 提交法人信息
let
legalQuery
=
{
record_id
:
this
.
enterpriseId
?
this
.
enterpriseId
:
this
.
establishForm
.
enterprise_id
,
front_completeness
:
0
,
bak_completeness
:
0
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
front_img
,
bak_img
,
idcard_number
,
name
:
userName
,
legal_mobile
,
data_type
};
// 企业信息提交参数
let
{
code
,
name
,
entterprise_image
,
data_type
,
mobile
,
user_id
,
front_img
,
bak_img
,
idcard_number
,
name
:
userName
,
legal_mobile
}
=
this
.
establishForm
;
/**
* 第一步 企业信息提交(修改)
* @param enterpriseQuery
*/
console
.
log
(
"是否为修改的ID"
,
this
.
enterpriseId
);
// 提交
if
(
!
this
.
enterpriseId
)
{
const
enterpriseQuery
=
{
code
,
name
,
entterprise_image
,
data_from
:
3
,
data_type
,
mobile
,
proxy_user_name
:
this
.
$store
.
state
.
userInfo
.
email
};
postBusiness
(
enterpriseQuery
).
then
(
res
=>
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
establishForm
.
enterprise_id
=
res
.
result
.
enterprise_auth_record_id
;
});
}
// 修改
else
{
let
{
code
,
name
,
entterprise_image
,
data_type
,
mobile
}
=
this
.
establishForm
;
entterprise_image
=
this
.
transformObjectId
(
entterprise_image
);
const
editQuery
=
{
record_id
:
this
.
enterpriseId
,
code
,
name
,
entterprise_image
,
data_type
,
data_from
:
3
,
mobile
};
console
.
log
(
"参数修改"
,
editQuery
);
opBusinessUpdate
(
editQuery
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
});
}
/**
* 第二步 法人(经营者信息提交)
*/
front_img
=
this
.
transformObjectId
(
front_img
);
bak_img
=
this
.
transformObjectId
(
bak_img
);
// 提交法人信息
let
legalQuery
=
{
record_id
:
this
.
enterpriseId
?
this
.
enterpriseId
:
this
.
establishForm
.
enterprise_id
,
front_completeness
:
0
,
bak_completeness
:
0
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
front_img
,
bak_img
,
idcard_number
,
name
:
userName
,
legal_mobile
,
data_type
};
const
result
=
await
opCommit
(
legalQuery
);
if
(
result
.
code
!==
0
)
return
this
.
$message
.
error
(
result
.
reason
);
this
.
$message
.
success
(
`企业信息
${
this
.
enterpriseId
?
"修改"
:
"代提交"
}
成功!`
);
this
.
$router
.
replace
({
name
:
"Certification"
});
opCommit
(
legalQuery
).
then
(
result
=>
{
if
(
result
.
code
!==
0
)
return
this
.
$message
.
error
(
result
.
reason
);
this
.
$message
.
success
(
`企业信息
${
this
.
enterpriseId
?
"修改"
:
"代提交"
}
成功!`
);
this
.
$router
.
replace
({
name
:
"Certification"
});
});
}
else
{
this
.
$message
.
error
(
"请按规则填写必填表单!!"
);
return
false
;
}
});
},
// 转换图片地址为ObjectId
transformObjectId
(
urls
)
{
try
{
...
...
@@ -461,7 +482,12 @@ export default {
}
catch
(
error
)
{
return
urls
;
}
}
},
// 清除校验
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