|
@ -149,7 +149,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="rb-input-box rb-line b-flex-x b-flex-b"> |
|
|
<view class="rb-input-box rb-line b-flex-x b-flex-b"> |
|
|
<view class="rb-input-title b-flex-x">手机号<text>*</text></view> |
|
|
<view class="rb-input-title b-flex-x">手机号<text>*</text></view> |
|
|
<input class="rb-input" v-model="submitData.contact_number" type="tel" placeholder="请输入手机号" |
|
|
|
|
|
|
|
|
<input class="rb-input" v-model="submitData.contact_number" maxlength="11" type="tel" placeholder="请输入手机号" |
|
|
placeholder-class="input-hold-class"></input> |
|
|
placeholder-class="input-hold-class"></input> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -164,6 +164,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import util from '@/utils/util.js'; |
|
|
import util from '@/utils/util.js'; |
|
|
|
|
|
import{phoneReg} from '@/utils/util.js' |
|
|
import { getCnArea } from '../../../party/js/api'; |
|
|
import { getCnArea } from '../../../party/js/api'; |
|
|
// import { getCnArea } from '../../../party/js/china-area'; |
|
|
// import { getCnArea } from '../../../party/js/china-area'; |
|
|
|
|
|
|
|
@ -206,8 +207,8 @@ |
|
|
oper_mobile: "", //手机号 |
|
|
oper_mobile: "", //手机号 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitData: { |
|
|
|
|
|
|
|
|
submitData:{} , |
|
|
|
|
|
submitDataOrigin: { |
|
|
// qualification_type: null, // 主体类型 |
|
|
// qualification_type: null, // 主体类型 |
|
|
// credit_end_date: '', // 营业执照有效期,格式:2006-01-02,永久用 0 表示 |
|
|
// credit_end_date: '', // 营业执照有效期,格式:2006-01-02,永久用 0 表示 |
|
|
// company_type: null, // 企业类型 |
|
|
// company_type: null, // 企业类型 |
|
@ -219,13 +220,13 @@ |
|
|
// business_id_card: '', // 运营人员身份证号 |
|
|
// business_id_card: '', // 运营人员身份证号 |
|
|
|
|
|
|
|
|
// "business_user_code": "",// |
|
|
// "business_user_code": "",// |
|
|
"mobile": "", |
|
|
|
|
|
"status": 2, |
|
|
|
|
|
"update_status": 1, |
|
|
|
|
|
"update_pre_web_brand_user": null, |
|
|
|
|
|
|
|
|
"mobile": "",//手机号 |
|
|
|
|
|
// "status": 2, |
|
|
|
|
|
// "update_status": 1, |
|
|
|
|
|
// "update_pre_web_brand_user": null, |
|
|
"brand_name": "", //品牌名称 |
|
|
"brand_name": "", //品牌名称 |
|
|
"company_name": "", //企业名称 |
|
|
"company_name": "", //企业名称 |
|
|
"business_license": "", |
|
|
|
|
|
|
|
|
"business_license": "",//营业执照 |
|
|
"agency_code": "",//信用代码 |
|
|
"agency_code": "",//信用代码 |
|
|
"province": "", |
|
|
"province": "", |
|
|
"city": "", |
|
|
"city": "", |
|
@ -241,7 +242,7 @@ |
|
|
"extension": { |
|
|
"extension": { |
|
|
"qualification_type": 1,//主体类型 |
|
|
"qualification_type": 1,//主体类型 |
|
|
"credit_end_date": "0", //格式:2006-01-02,永久用 0 表示 |
|
|
"credit_end_date": "0", //格式:2006-01-02,永久用 0 表示 |
|
|
"company_type": 1,//企业类型 |
|
|
|
|
|
|
|
|
"company_type": 1,//企业类型 |
|
|
"legal_person_name": "",//法人姓名 |
|
|
"legal_person_name": "",//法人姓名 |
|
|
"registered_province_code": "",//省份编号 110000 |
|
|
"registered_province_code": "",//省份编号 110000 |
|
|
"registered_city_code": "",//城市编号 110100 |
|
|
"registered_city_code": "",//城市编号 110100 |
|
@ -376,6 +377,7 @@ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
webBrandUserGet(){ |
|
|
webBrandUserGet(){ |
|
|
// util.showNone("检测是否有数据回显") |
|
|
// util.showNone("检测是否有数据回显") |
|
|
|
|
|
|
|
@ -399,6 +401,11 @@ |
|
|
if(res.data.data)this.submitData = res.data.data |
|
|
if(res.data.data)this.submitData = res.data.data |
|
|
|
|
|
|
|
|
this.checkSubmitDataIsNull() |
|
|
this.checkSubmitDataIsNull() |
|
|
|
|
|
|
|
|
|
|
|
this.resetSubmitDataFromOrigin() |
|
|
|
|
|
|
|
|
|
|
|
this.setPickerValueShow() |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
util.showNone(res.data.message) |
|
|
util.showNone(res.data.message) |
|
|
} |
|
|
} |
|
@ -409,6 +416,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
checkSubmitDataIsNull(){ |
|
|
checkSubmitDataIsNull(){ |
|
|
|
|
|
//某些情况下后台返回的数据是null,这里需要初始化 |
|
|
if(!this.submitData.extension){ |
|
|
if(!this.submitData.extension){ |
|
|
this.submitData.extension = { |
|
|
this.submitData.extension = { |
|
|
"qualification_type": 1,//主体类型 |
|
|
"qualification_type": 1,//主体类型 |
|
@ -423,6 +431,17 @@ |
|
|
"business_id_card_back_url":"",//运营人员身份证国徽面 |
|
|
"business_id_card_back_url":"",//运营人员身份证国徽面 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//回显地址数据 |
|
|
|
|
|
let {registered_city_code,registered_province_code} = this.submitData.extension |
|
|
|
|
|
let {province,city,area} = this.submitData |
|
|
|
|
|
if(registered_city_code&®istered_province_code&&province&&city&&area){ |
|
|
|
|
|
this.areaDetail = { |
|
|
|
|
|
value: [province,city,area], |
|
|
|
|
|
code: [registered_province_code,registered_city_code], |
|
|
|
|
|
postcode: '' |
|
|
|
|
|
} |
|
|
|
|
|
// this.areaValueShow = this.areaDetail.value.join('/') |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
//上传照片 |
|
|
//上传照片 |
|
|
async clickUploadLicenseImg() { |
|
|
async clickUploadLicenseImg() { |
|
@ -555,6 +574,19 @@ |
|
|
this.submitData.extension.credit_end_date = `${year}-${month}-${day}` |
|
|
this.submitData.extension.credit_end_date = `${year}-${month}-${day}` |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if(res.Response.Type){ |
|
|
|
|
|
let _index = "" |
|
|
|
|
|
const t = this.company_types.find((item,index) => { |
|
|
|
|
|
if(item.label === res.Response.Type){ |
|
|
|
|
|
console.log("item.label", item.label, res.Response.Type, item.label === res.Response.Type) |
|
|
|
|
|
_index = index |
|
|
|
|
|
return item |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
this.submitData.extension.company_type = t.value |
|
|
|
|
|
this.company_type_index = _index |
|
|
|
|
|
this.company_type_show = this.company_types_arr[_index] |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.submitData.extension.business_id_card = res.Response.IdNum |
|
|
this.submitData.extension.business_id_card = res.Response.IdNum |
|
|
this.submitData.contact_person = res.Response.Name |
|
|
this.submitData.contact_person = res.Response.Name |
|
@ -608,16 +640,25 @@ |
|
|
total += section + number; |
|
|
total += section + number; |
|
|
return total; |
|
|
return total; |
|
|
}, |
|
|
}, |
|
|
|
|
|
setPickerValueShow(){//根据回显数据初始化picker值的显示 |
|
|
|
|
|
console.log("setPickerValue") |
|
|
|
|
|
this.qualification_type_index = this.submitData.extension.qualification_type |
|
|
|
|
|
this.company_type_index = this.submitData.extension.company_type |
|
|
|
|
|
this.qualification_type_show = this.qualification_types_arr[this.qualification_type_index] |
|
|
|
|
|
this.company_type_show = this.company_types_arr[this.company_type_index] |
|
|
|
|
|
}, |
|
|
bindPickerChange_qualification(e) { |
|
|
bindPickerChange_qualification(e) { |
|
|
console.log('bindPickerChange_qualification:', e.detail.value) |
|
|
console.log('bindPickerChange_qualification:', e.detail.value) |
|
|
if(e.detail.value>1)return util.showNone("仅支持:企业或个体工商户") |
|
|
if(e.detail.value>1)return util.showNone("仅支持:企业或个体工商户") |
|
|
this.qualification_type_index = e.detail.value |
|
|
this.qualification_type_index = e.detail.value |
|
|
this.qualification_type_show = this.qualification_types_arr[e.detail.value] |
|
|
this.qualification_type_show = this.qualification_types_arr[e.detail.value] |
|
|
|
|
|
this.submitData.extension.qualification_type = this.qualification_types[e.detail.value].value |
|
|
}, |
|
|
}, |
|
|
bindPickerChange_company_types(e) { |
|
|
bindPickerChange_company_types(e) { |
|
|
console.log('bindPickerChange_company_types:', e.detail.value) |
|
|
console.log('bindPickerChange_company_types:', e.detail.value) |
|
|
this.company_type_index = e.detail.value |
|
|
this.company_type_index = e.detail.value |
|
|
this.company_type_show = this.company_types_arr[e.detail.value] |
|
|
this.company_type_show = this.company_types_arr[e.detail.value] |
|
|
|
|
|
this.submitData.extension.company_type = this.company_types[e.detail.value].value |
|
|
}, |
|
|
}, |
|
|
bindPickerChange_address(e) { |
|
|
bindPickerChange_address(e) { |
|
|
console.log('bindPickerChange_address:', JSON.stringify(e.detail)) |
|
|
console.log('bindPickerChange_address:', JSON.stringify(e.detail)) |
|
@ -652,7 +693,7 @@ |
|
|
|
|
|
|
|
|
// 提交审核 |
|
|
// 提交审核 |
|
|
submitRegist() { |
|
|
submitRegist() { |
|
|
// if(!this.checkSubmitData())return |
|
|
|
|
|
|
|
|
if(!this.checkSubmitData())return |
|
|
|
|
|
|
|
|
// this.checkSubmitData() |
|
|
// this.checkSubmitData() |
|
|
|
|
|
|
|
@ -686,10 +727,24 @@ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
//将submitData按照submitDataOrigin的格式进行检查, 去掉不存在的字段 |
|
|
|
|
|
resetSubmitDataFromOrigin(){ |
|
|
|
|
|
let _data = JSON.parse(JSON.stringify(this.submitDataOrigin)) |
|
|
|
|
|
for (let key in _data) { |
|
|
|
|
|
if(this.submitData[key]){ |
|
|
|
|
|
_data[key] = this.submitData[key] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.submitData = _data |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
checkSubmitData(){ |
|
|
checkSubmitData(){ |
|
|
let {submitData} = this; |
|
|
let {submitData} = this; |
|
|
//循环submitData,检查是否有空值 |
|
|
|
|
|
|
|
|
let mobile = submitData.contact_number |
|
|
console.log("submitData",submitData) |
|
|
console.log("submitData",submitData) |
|
|
|
|
|
if(!mobile || !phoneReg.test(mobile))return util.showNone('请输入正确手机号码!'); |
|
|
|
|
|
|
|
|
|
|
|
//循环submitData,检查是否有空值 |
|
|
let unInput_arr = [] |
|
|
let unInput_arr = [] |
|
|
for (let key in submitData) { |
|
|
for (let key in submitData) { |
|
|
if (submitData[key] === '') { |
|
|
if (submitData[key] === '') { |
|
@ -697,6 +752,13 @@ |
|
|
unInput_arr.push(key) |
|
|
unInput_arr.push(key) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// this.submitData.extension |
|
|
|
|
|
for (let key in submitData.extension) { |
|
|
|
|
|
if (submitData.extension[key] === '') { |
|
|
|
|
|
console.log("submitData.extension key need:", key) |
|
|
|
|
|
unInput_arr.push(key) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
if(unInput_arr.length > 0){ |
|
|
if(unInput_arr.length > 0){ |
|
|
console.log("unInput_arr",unInput_arr.length, unInput_arr) |
|
|
console.log("unInput_arr",unInput_arr.length, unInput_arr) |
|
|
util.showNone("请完善信息后提交") |
|
|
util.showNone("请完善信息后提交") |
|
|