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
2a81f3bc
Commit
2a81f3bc
authored
Jun 16, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:非空校验判断更改完成
parent
a52a6666
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 @
2a81f3bc
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 @
2a81f3bc
...
@@ -439,7 +439,7 @@ export default {
...
@@ -439,7 +439,7 @@ export default {
return
this
.
$message
.
error
(
"请填写审核意见"
);
return
this
.
$message
.
error
(
"请填写审核意见"
);
const
res
=
await
postAudit
(
params
);
const
res
=
await
postAudit
(
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
$message
.
warning
(
"
拒绝审核通过
成功!"
);
this
.
$message
.
warning
(
"
审核拒绝
成功!"
);
this
.
$router
.
replace
({
name
:
"Certification"
});
this
.
$router
.
replace
({
name
:
"Certification"
});
}
}
},
},
...
...
src/pages/Enterprise/components/enterpriseForm.vue
View file @
2a81f3bc
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<!-- 营业执照金山云key -->
<!-- 营业执照金山云key -->
<el-form-item
<el-form-item
label=
"营业执照:"
label=
"营业执照:"
ref=
"
licenseChange
"
ref=
"
entterpriseImageRef
"
prop=
"businessLicense"
prop=
"businessLicense"
>
>
<el-image
<el-image
...
@@ -77,6 +77,7 @@
...
@@ -77,6 +77,7 @@
<!-- 身份证正面照片 -->
<!-- 身份证正面照片 -->
<el-form-item
<el-form-item
label=
"经营者(法人)身份证正面照"
label=
"经营者(法人)身份证正面照"
ref=
"frontImgRef"
prop=
"front_img"
prop=
"front_img"
>
>
<el-image
<el-image
...
@@ -101,6 +102,7 @@
...
@@ -101,6 +102,7 @@
<!-- 身份证反面照片 -->
<!-- 身份证反面照片 -->
<el-form-item
<el-form-item
label=
"经营者(法人)身份证反面照"
label=
"经营者(法人)身份证反面照"
ref=
"bakImgRef"
prop=
"bak_img"
prop=
"bak_img"
>
>
<el-image
<el-image
...
@@ -187,12 +189,13 @@ export default {
...
@@ -187,12 +189,13 @@ export default {
callback
(
new
Error
(
"请上传营业执照"
));
callback
(
new
Error
(
"请上传营业执照"
));
}
else
{
}
else
{
callback
();
callback
();
}
}
callback
();
callback
();
};
};
// 身份证照片正面校验规则
// 身份证照片正面校验规则
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
establishForm
.
idcardFontPhoto
.
length
===
0
)
{
if
(
!
this
.
establishForm
.
front_img
)
{
callback
(
new
Error
(
"请上传身份正面证照片"
));
callback
(
new
Error
(
"请上传身份正面证照片"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -201,7 +204,7 @@ export default {
...
@@ -201,7 +204,7 @@ export default {
};
};
// 身份证照片反面校验规则
// 身份证照片反面校验规则
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
establishForm
.
idcardBackPhoto
.
length
===
0
)
{
if
(
!
this
.
establishForm
.
bak_img
)
{
callback
(
new
Error
(
"请上传身份反面证照片"
));
callback
(
new
Error
(
"请上传身份反面证照片"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -339,6 +342,7 @@ export default {
...
@@ -339,6 +342,7 @@ export default {
// 上传营业执照时
// 上传营业执照时
handleEnterpriseSuccess
(
res
)
{
handleEnterpriseSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"entterpriseImageRef"
);
this
.
establishForm
.
entterpriseImage
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterpriseImage
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterprise_image
=
res
.
result
.
object_id
;
this
.
establishForm
.
entterprise_image
=
res
.
result
.
object_id
;
},
},
...
@@ -346,6 +350,7 @@ export default {
...
@@ -346,6 +350,7 @@ export default {
// 上传身份证前面
// 上传身份证前面
handleFontSuccess
(
res
)
{
handleFontSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"frontImgRef"
);
this
.
establishForm
.
frontImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
frontImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
front_img
=
res
.
result
.
object_id
;
this
.
establishForm
.
front_img
=
res
.
result
.
object_id
;
},
},
...
@@ -353,6 +358,7 @@ export default {
...
@@ -353,6 +358,7 @@ export default {
// 上传身份证后面
// 上传身份证后面
handleBackSuccess
(
res
)
{
handleBackSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"bakImgRef"
)
this
.
establishForm
.
bakImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
bakImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
bak_img
=
res
.
result
.
object_id
;
this
.
establishForm
.
bak_img
=
res
.
result
.
object_id
;
},
},
...
@@ -363,94 +369,109 @@ export default {
...
@@ -363,94 +369,109 @@ export default {
},
},
// 提交表单
// 提交表单
async
handelSubmit
()
{
handelSubmit
(
formName
)
{
if
(
this
.
enterpriseId
&&
!
this
.
establishForm
.
sensitiveWord
)
this
.
$refs
[
formName
].
validate
(
valid
=>
{
return
this
.
$message
.
error
(
"您无敏感词权限修改信息!!!"
);
console
.
log
(
valid
);
if
(
valid
)
{
if
(
this
.
enterpriseId
&&
!
this
.
establishForm
.
sensitiveWord
)
return
this
.
$message
.
error
(
"您无敏感词权限修改信息!!!"
);
// 企业信息提交参数
// 企业信息提交参数
let
{
let
{
code
,
code
,
name
,
name
,
entterprise_image
,
entterprise_image
,
data_type
,
data_type
,
mobile
,
mobile
,
user_id
,
user_id
,
front_img
,
front_img
,
bak_img
,
bak_img
,
idcard_number
,
idcard_number
,
name
:
userName
,
name
:
userName
,
legal_mobile
,
legal_mobile
}
=
this
.
establishForm
;
}
=
this
.
establishForm
;
/**
/**
* 第一步 企业信息提交(修改)
* 第一步 企业信息提交(修改)
* @param enterpriseQuery
* @param enterpriseQuery
*/
*/
console
.
log
(
"是否为修改的ID"
,
this
.
enterpriseId
);
console
.
log
(
"是否为修改的ID"
,
this
.
enterpriseId
);
// 提交
// 提交
if
(
!
this
.
enterpriseId
)
{
if
(
!
this
.
enterpriseId
)
{
const
enterpriseQuery
=
{
const
enterpriseQuery
=
{
code
,
code
,
name
,
name
,
entterprise_image
,
entterprise_image
,
data_from
:
3
,
data_from
:
3
,
data_type
,
data_type
,
mobile
,
mobile
,
proxy_user_name
:
this
.
$store
.
state
.
userInfo
.
email
proxy_user_name
:
this
.
$store
.
state
.
userInfo
.
email
};
};
const
res
=
await
postBusiness
(
enterpriseQuery
);
postBusiness
(
enterpriseQuery
).
then
(
res
=>
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
establishForm
.
enterprise_id
=
res
.
result
.
enterprise_auth_record_id
;
this
.
establishForm
.
enterprise_id
=
}
res
.
result
.
enterprise_auth_record_id
;
// 修改
});
else
{
}
let
{
// 修改
code
,
else
{
name
,
let
{
entterprise_image
,
code
,
data_type
,
name
,
mobile
entterprise_image
,
}
=
this
.
establishForm
;
data_type
,
entterprise_image
=
this
.
transformObjectId
(
entterprise_image
);
mobile
const
editQuery
=
{
}
=
this
.
establishForm
;
record_id
:
this
.
enterpriseId
,
entterprise_image
=
this
.
transformObjectId
(
entterprise_image
);
code
,
const
editQuery
=
{
name
,
record_id
:
this
.
enterpriseId
,
entterprise_image
,
code
,
data_type
,
name
,
data_from
:
3
,
entterprise_image
,
mobile
data_type
,
};
data_from
:
3
,
console
.
log
(
"参数修改"
,
editQuery
);
mobile
const
res
=
await
opBusinessUpdate
(
editQuery
);
};
console
.
log
(
res
);
console
.
log
(
"参数修改"
,
editQuery
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
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
=
{
front_img
=
this
.
transformObjectId
(
front_img
);
record_id
:
this
.
enterpriseId
bak_img
=
this
.
transformObjectId
(
bak_img
);
?
this
.
enterpriseId
// 提交法人信息
:
this
.
establishForm
.
enterprise_id
,
let
legalQuery
=
{
front_completeness
:
0
,
record_id
:
this
.
enterpriseId
bak_completeness
:
0
,
?
this
.
enterpriseId
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
:
this
.
establishForm
.
enterprise_id
,
front_img
,
front_completeness
:
0
,
bak_img
,
bak_completeness
:
0
,
idcard_number
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
name
:
userName
,
front_img
,
legal_mobile
,
bak_img
,
data_type
idcard_number
,
};
name
:
userName
,
legal_mobile
,
data_type
};
const
result
=
await
opCommit
(
legalQuery
);
opCommit
(
legalQuery
).
then
(
result
=>
{
if
(
result
.
code
!==
0
)
return
this
.
$message
.
error
(
result
.
reason
);
if
(
result
.
code
!==
0
)
return
this
.
$message
.
error
(
result
.
reason
);
this
.
$message
.
success
(
`企业信息
${
this
.
enterpriseId
?
"修改"
:
"代提交"
}
成功!`
);
this
.
$message
.
success
(
this
.
$router
.
replace
({
name
:
"Certification"
});
`企业信息
${
this
.
enterpriseId
?
"修改"
:
"代提交"
}
成功!`
);
this
.
$router
.
replace
({
name
:
"Certification"
});
});
}
else
{
this
.
$message
.
error
(
"请按规则填写必填表单!!"
);
return
false
;
}
});
},
},
// 转换图片地址为ObjectId
// 转换图片地址为ObjectId
transformObjectId
(
urls
)
{
transformObjectId
(
urls
)
{
try
{
try
{
...
@@ -461,7 +482,12 @@ export default {
...
@@ -461,7 +482,12 @@ export default {
}
catch
(
error
)
{
}
catch
(
error
)
{
return
urls
;
return
urls
;
}
}
}
},
// 清除校验
clearValidate
(
formName
)
{
this
.
$refs
[
formName
].
clearValidate
();
},
}
}
};
};
</
script
>
</
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