Commit e434d76e authored by 郑娟's avatar 郑娟

营业期限;省市区;日期选择器;设备清单

parent 92ccbc0e
......@@ -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.2"'
currentVersion: '"4.1.3"'
}
......@@ -274,7 +274,9 @@ export default {
nowDate: (new Date(iToYear, iToMon, (iToDay + 30))).format('yyyy-MM-dd'),
format: format,
callback: (date) => {
vm.$set(vm.equipInfo, 'departure_date', date)
// vm.$set(vm.equipInfo, 'departure_date', date)
vm.equipInfo.departure_date = date
vm.$forceUpdate()
},
})
},
......@@ -291,7 +293,9 @@ export default {
nowDate: (new Date(iToYear, iToMon, (iToDay + 30))).format('yyyy-MM-dd'),
format: format,
callback: (date) => {
vm.$set(vm.equipInfo, 'invoice_date', date)
vm.equipInfo.invoice_date = date
// vm.$set(vm.equipInfo, 'invoice_date', date)
vm.$forceUpdate()
},
})
},
......@@ -381,7 +385,7 @@ export default {
} else {
let param = {
master: {
project_lease_item_id: this.equipInfo.project_lease_item_id,
project_lease_item_id: this.project_lease_item_id,
project_id: window.localStorage.project_id,
frame_number: this.equipInfo.frame_number,
engine: this.equipInfo.engine,
......@@ -534,7 +538,7 @@ export default {
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
// 合格证识别
vehicleIdentify(fileUrl) {
vehicleIdentify (fileUrl) {
let vm = this
hlsPopup.showLoading('正在识别...')
let url
......@@ -568,6 +572,7 @@ export default {
vm.equipInfo.vehicle_model = result.car_type.word // 车辆型号
vm.equipInfo.certificate_number = result.vechicle_ok_no.word
}
vm.$forceUpdate()
vm.equipInfo.project_lease_item_id = ''
vm.equipInfo.departure_date = ''
vm.equipInfo.invoice_date = ''
......
......@@ -1711,6 +1711,12 @@ export default {
returnItem: function (index, obj) {
vm.baseInfo.province_id = obj.bp_type
vm.baseInfo.province_name = obj.bp_type_n
// 清空 市 区
vm.baseInfo.city_id = ''
vm.baseInfo.city_name = ''
vm.baseInfo.district_id = ''
vm.baseInfo.district_name = ''
//
vm.getCity()
},
})
......@@ -1727,6 +1733,8 @@ export default {
returnItem: function (index, obj) {
vm.baseInfo.city_id = obj.bp_type
vm.baseInfo.city_name = obj.bp_type_n
vm.baseInfo.district_id = ''
vm.baseInfo.district_name = ''
vm.getDistrict()
},
})
......@@ -1816,6 +1824,12 @@ export default {
returnItem: function (index, obj) {
vm.baseInfo.register_province = obj.bp_type
vm.baseInfo.register_province_n = obj.bp_type_n
// 清空 市 区
vm.baseInfo.register_city = ''
vm.baseInfo.register_city_n = ''
vm.baseInfo.register_district = ''
vm.baseInfo.register_district_n = ''
//
vm.getRegisterCity()
},
})
......@@ -1832,6 +1846,8 @@ export default {
returnItem: function (index, obj) {
vm.baseInfo.register_city = obj.bp_type
vm.baseInfo.register_city_n = obj.bp_type_n
vm.baseInfo.register_district = ''
vm.baseInfo.register_district_n = ''
vm.getRegisterDistrict()
},
})
......
......@@ -150,7 +150,7 @@
/>
</item>
<item v-if="businessDateShow" :showArrow="true">
<div slot="name" class="required">营业期限从</div>
<div slot="name" >营业期限从</div>
<input
slot="content"
v-model="baseInfo.business_term_from"
......@@ -160,8 +160,8 @@
@click="selectTime('YYYY-MM-DD',0)"
>
</item>
<item v-if="businessDateShow" :showArrow="true">
<div slot="name" class="required">营业期限到</div>
<item :showArrow="true">
<div slot="name" >营业期限到</div>
<input
slot="content"
v-model="baseInfo.business_term_to"
......@@ -171,13 +171,16 @@
@click="selectTime('YYYY-MM-DD',1)"
>
</item>
<item v-if="!businessDateShow" >
<div slot="name" class="required">营业期限</div>
<item :showArrow="true">
<div slot="name" >营业期限</div>
<input
slot="content"
v-model="baseInfo.business_term_type_n"
placeholder="上传营业执照自动填充"
class="auto"
type="text"
readonly
onfocus="this.blur()"
@click="selectBusinessType"
>
</item>
<item>
......@@ -652,6 +655,7 @@ export default {
registered_place: '',
organization_code: '',
registered_capital: '',
business_term_type: '',
business_term_type_n: '',
business_term_from: '',
business_term_to: '',
......@@ -769,6 +773,7 @@ export default {
vm.$route.meta.keepAlive = true
vm.getBpType()
vm.getProvince()
vm.getBusinessTypeList()
vm.isAddNewType = false
if (['/myBindUser', '/tab/my-info', '/tab/function-center', '/invoice'].includes(from.fullPath)) { /* || from.fullPath === '/margin-first-pay' */
vm.bp_type_flag = false
......@@ -819,6 +824,7 @@ export default {
registered_capital: '',
// business_license_num: '',
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class || 'ORG',
business_term_type: '',
business_term_type_n: '',
business_term_from: '',
business_term_to: '',
......@@ -929,6 +935,7 @@ export default {
registered_capital: '',
// business_license_num: '',
bp_class: JSON.parse(window.localStorage.getItem('handleUser')).bp_class || 'ORG',
business_term_type: '',
business_term_type_n: '',
business_term_from: '',
business_term_to: '',
......@@ -1515,19 +1522,19 @@ export default {
vm.hlsPopup.showLongCenter('授权人身份证不正确')
}
}
if (vm.lastInfo.business_term_type === 'FIXED_TERM') {
if (!vm.lastInfo.business_term_from && !vm.lastInfo.business_term_to) {
vm.msg_flag = false
console.log('营业期限2', !vm.lastInfo.business_term_from, !vm.lastInfo.business_term_to);
vm.hlsPopup.showLongCenter('营业期限未填')
}
} else {
if (!vm.lastInfo.business_term_type_n) {
vm.msg_flag = false
console.log('营业期限2', !vm.lastInfo.business_term_type_n);
vm.hlsPopup.showLongCenter('营业期限未填')
}
}
// if (vm.lastInfo.business_term_type === 'FIXED_TERM') {
// if (!vm.lastInfo.business_term_from && !vm.lastInfo.business_term_to) {
// vm.msg_flag = false
// console.log('营业期限2', !vm.lastInfo.business_term_from, !vm.lastInfo.business_term_to);
// vm.hlsPopup.showLongCenter('营业期限未填')
// }
// } else {
// if (!vm.lastInfo.business_term_type_n) {
// vm.msg_flag = false
// console.log('营业期限2', !vm.lastInfo.business_term_type_n);
// vm.hlsPopup.showLongCenter('营业期限未填')
// }
// }
if (vm.msg_flag) {
vm.dowload_list = [] // 保存之前将图片下载列表清空,防止出现重复的图片
......@@ -1791,8 +1798,10 @@ export default {
// 选择日期
selectTime (format, flag) {
let vm = this
let date = new Date()
hlsPopup.showTime({
nowDate: (new Date()).format('YYYY-MM-DD'),
nowDate: date.format('yyyy-MM-dd'),
// nowDate: (new Date()).format('YYYY-MM-DD'),
format: format,
callback: (date) => {
if (flag) {
......@@ -1803,6 +1812,25 @@ export default {
},
})
},
// 选择 营业期限
selectBusinessType (e) {
let vm = this
vm.hlsPopup.selectList({
list: vm.businessTypeList,
code: 'type',
object: {},
returnItem: function (index, obj) {
if (obj.type === 'LONG_TERM') {
vm.baseInfo.business_term_to = ''
vm.baseInfo.business_term_from = ''
}
vm.baseInfo.business_term_type = obj.type
vm.baseInfo.business_term_type_n = obj.type_n
vm.$forceUpdate()
// console.log(vm.baseInfo);
},
})
},
// 选择省份
selectProvince (e) {
let vm = this
......@@ -1813,6 +1841,12 @@ export default {
returnItem: function (index, obj) {
vm.baseInfo.province_id = obj.bp_type
vm.baseInfo.province_name = obj.bp_type_n
// 清空 市 区
vm.baseInfo.city_id = ''
vm.baseInfo.city_name = ''
vm.baseInfo.district_id = ''
vm.baseInfo.district_name = ''
//
vm.getCity()
},
})
......@@ -1830,6 +1864,8 @@ export default {
returnItem: function (index, obj) {
vm.baseInfo.city_id = obj.bp_type
vm.baseInfo.city_name = obj.bp_type_n
vm.baseInfo.district_id = ''
vm.baseInfo.district_name = ''
vm.getDistrict()
},
})
......@@ -1850,6 +1886,22 @@ export default {
},
})
},
getBusinessTypeList () { // 营业期限值集获取
let vm = this
let url = $config.basePath + 'app_get_syscode'
let param = {
'BUSINESS_TERM_TYPE': 'BUSINESS_TERM_TYPE',
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.return_status === 'S') {
vm.businessTypeList = res.BUSINESS_TERM_TYPE
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// 省份查询
getProvince () {
let vm = this
......@@ -2023,11 +2075,11 @@ export default {
if (res.info.business_term_type === 'FIXED_TERM') {
vm.baseInfo.business_term_from = /\d{4}-\d{1,2}-\d{1,2}/g.exec(res.info.business_term_from)[0]
vm.baseInfo.business_term_to = /\d{4}-\d{1,2}-\d{1,2}/g.exec(res.info.business_term_to)[0]
vm.businessDateShow = true
// vm.businessDateShow = true
}
if (res.info.business_term_type === 'LONG_TERM') {
vm.baseInfo.business_term_type_n = '长期'
vm.businessDateShow = false
// // vm.businessDateShow = false
}
console.log(vm.baseInfo)
vm.authMsg.auth_person_name = res.info.auth_person_name
......@@ -2261,11 +2313,11 @@ export default {
vm.baseInfo.business_address = vm.baseInfo.registered_place // 经营地址默认为注册地址,支持修改
// 营业期限
if (['长期', '永久'].indexOf(result.有效期.words) !== -1) {
vm.businessDateShow = false
// vm.businessDateShow = false
vm.baseInfo.business_term_type_n = '长期'
vm.baseInfo.business_term_type = 'LONG_TERM'
vm.baseInfo.business_term_type = 'LONG_TERM'
} else {
vm.businessDateShow = true
// 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'
......
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