Commit 3c5dafe5 authored by 郑娟's avatar 郑娟

注册资本校验、营业期限OCR识别输入

parent 510942ec
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"4.1.5"'
currentVersion: '"4.1.6"'
}
......@@ -131,7 +131,7 @@
class="auto"
>
</item>
<item>
<!-- <item>
<div slot="name" class="required">年份</div>
<input
slot="content"
......@@ -150,7 +150,7 @@
placeholder="上传身份证自动填充"
class="auto"
>
</item>
</item> -->
<item>
<div slot="name" class="required">户籍地址</div>
<textarea
......
......@@ -1308,7 +1308,7 @@ export default {
vm.hlsPopup.showLongCenter('资产信息不能为空!')
return
}
var reg = new RegExp('^[0-9]*$')
var reg = new RegExp('(^[1-9]{1}[0-9]*$)|(^[0-9]*\.[0-9]{1,2}$)')
if (vm.baseInfo.registered_capital.indexOf('万元') == -1 || !reg.test(vm.baseInfo.registered_capital.replace('万元', '')) || vm.baseInfo.registered_capital.replace('万元', '').length == 0) {
vm.hlsPopup.showLongCenter('请输入正确格式的注册资本!(例如:3000万元)')
return
......@@ -2315,13 +2315,36 @@ export default {
if (['长期', '永久'].indexOf(result.有效期.words) !== -1) {
// vm.businessDateShow = false
vm.baseInfo.business_term_type_n = '长期'
vm.baseInfo.business_term_type = 'LONG_TERM'
vm.baseInfo.business_term_type = 'LONG_TERM'
vm.baseInfo.business_term_to = ''
vm.baseInfo.business_term_from = ''
} else if (result.有效期.words==='无') {
vm.baseInfo.business_term_to = ''
vm.baseInfo.business_term_from = ''
vm.baseInfo.business_term_type_n = ''
vm.baseInfo.business_term_type = ''
} else {
// vm.businessDateShow = true
vm.baseInfo.business_term_to = (result.有效期.words).replace('年', '-').replace('月', '-').replace('日', '')
vm.baseInfo.business_term_from = (result.有效期起始日期.words).replace('年', '-').replace('月', '-').replace('日', '')
vm.baseInfo.business_term_type = 'FIXED_TERM'
vm.baseInfo.business_term_type_n = '固定期限'
let reg = /^[0-9,/:-\s]+$/;
if (!isNaN(Date.parse(new Date(result.有效期.words.replace(/-/g, '/')))) && isNaN(result.有效期.words) && reg.test(times)) {
vm.baseInfo.business_term_to = (result.有效期.words).replace('年', '-').replace('月', '-').replace('日', '')
} else {
vm.baseInfo.business_term_to = ''
vm.baseInfo.business_term_type_n = ''
vm.baseInfo.business_term_type = ''
}
if (!isNaN(Date.parse(new Date(result.有效期起始日期.words.replace(/-/g, '/')))) && isNaN(result.有效期起始日期.words) && reg.test(result.有效期起始日期.words)) {
vm.baseInfo.business_term_from = (result.有效期起始日期.words).replace('年', '-').replace('月', '-').replace('日', '')
} else {
vm.baseInfo.business_term_from = ''
vm.baseInfo.business_term_type_n = ''
vm.baseInfo.business_term_type = ''
}
// vm.baseInfo.business_term_to = (result.有效期.words).replace('年', '-').replace('月', '-').replace('日', '')
// vm.baseInfo.business_term_from = (result.有效期起始日期.words).replace('年', '-').replace('月', '-').replace('日', '')
}
if (result.社会信用代码.words.includes('(')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment