附件上传

This commit is contained in:
zhouna
2019-10-14 15:11:31 +08:00
parent 0588240936
commit f726c2bef5

View File

@@ -12,7 +12,7 @@
<div v-if="item.id == saleInsuredInfo.idType">
<div v-if="item.id == '1' || item.id == '2' || item.id == '3' || item.id == '5' || item.id == '6' || item.id == '8' || item.id == '9'">
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}头像面`" disabled />
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}面`" disabled />
</van-cell-group>
<div @click="test('fileListIdFront', saleInsuredInfo.idType)" class="flex align-items-e">
<van-uploader
@@ -26,7 +26,7 @@
/>
</div>
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}国徽页`" disabled />
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
</van-cell-group>
<div @click="test('fileListIdBack', saleInsuredInfo.idType)">
<van-uploader
@@ -107,7 +107,7 @@
</div>
</div>
<van-cell-group v-if="isAppant == '0'">
<van-field required label="银行卡账户" disabled />
<van-field required label="银行卡正面" disabled />
</van-cell-group>
<div @click="test('fileListBank', saleInsuredInfo.idType)" v-if="isAppant == '0'">
<van-uploader
@@ -120,6 +120,20 @@
:max-count="1"
/>
</div>
<van-cell-group v-if="isAppant == '0'">
<van-field required label="银行卡反面" disabled />
</van-cell-group>
<div @click="test('fileListBankBack', saleInsuredInfo.idType)" v-if="isAppant == '0'">
<van-uploader
name="fileListBankBack"
v-model="fileListBankBack"
:after-read="afterRead"
@delete="deleteImg"
:before-delete="beforeDelete"
class="mt10 ml20"
:max-count="1"
/>
</div>
</div>
</div>
</div>
@@ -134,7 +148,7 @@
<div v-if="item.id == saleInsuredPersonInfo.idType">
<div v-if="item.id == '1' || item.id == '2' || item.id == '3' || item.id == '5' || item.id == '6' || item.id == '8' || item.id == '9'">
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}头像面`" disabled />
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}面`" disabled />
</van-cell-group>
<div @click="test('fileListIdFrontInsured', saleInsuredPersonInfo.idType)">
<van-uploader
@@ -148,7 +162,7 @@
/>
</div>
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}国徽页`" disabled />
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
</van-cell-group>
<div @click="test('fileListIdBackInsured', saleInsuredPersonInfo.idType)">
<van-uploader
@@ -164,7 +178,7 @@
</div>
<div v-if="item.id == '4'">
<van-cell-group>
<van-field required :label="`${item.text}头像`" disabled />
<van-field required :label="`${item.text}头像`" disabled />
</van-cell-group>
<div @click="test('fileLIstImgInsured', saleInsuredPersonInfo.idType)">
<van-uploader
@@ -320,8 +334,10 @@ export default {
saleInsuredInfoOther: [],
// 被保人选择的必选其他
saleInsuredPersonInfoOther: [],
// 银行账户
// 银行卡正面
fileListBank: [],
//银行卡反面
fileListBankBack: [],
// 被保人身份证正面
fileListIdFrontInsured: [],
// 被保人身份证反面
@@ -529,6 +545,8 @@ export default {
this.fileLIstImg = []
} else if (detail.name == 'fileListBank') {
this.fileListBank = []
} else if (detail.name == 'fileListBankBack') {
this.fileListBankBack = []
} else if (detail.name == 'fileListIdFrontInsured') {
this.fileListIdFrontInsured = []
} else if (detail.name == 'fileListIdBackInsured') {
@@ -572,6 +590,9 @@ export default {
case 'fileListBank':
that.type = type
break
case 'fileListBankBack':
that.type = type
break
case 'fileListOther':
that.type = type
break
@@ -656,32 +677,85 @@ export default {
that.type == 'fileListIdBack' ||
that.type == 'fileLIstImg' ||
that.type == 'fileListBank' ||
that.type == 'fileListBankBack' ||
that.type == 'saleInsuredInfoOther'
) {
// 是投保人
// console.log(that.file)
// 证件类型
let imageInfoType = ''
// if (that.type == 'fileListIdFront' && that.id == '1') {
// imageInfoType = '1'
// } else if (that.type == 'fileListIdBack' && that.id == '1') {
// imageInfoType = '2'
// } else if (that.type == 'fileListBank') {
// imageInfoType = '3'
// } else if (that.type == 'fileListIdFront' && that.id == '2') {
// imageInfoType = '5'
// } else if (that.type == 'fileListIdBack' && that.id == '2') {
// imageInfoType = '6'
// } else if (that.type == 'fileLIstImg' && that.id == '3') {
// imageInfoType = '7'
// } else if (that.type == 'fileLIstImg' && that.id == '4') {
// imageInfoType = '8'
// } else if (that.type == 'fileLIstImg' && that.id == '5') {
// imageInfoType = '9'
// } else if (that.type == 'fileLIstImg' && that.id == '6') {
// imageInfoType = '10'
// } else if (that.type == 'saleInsuredInfoOther' && that.id == '7') {
// imageInfoType = '11'
// }
if (that.type == 'fileListIdFront' && that.id == '1') {
//身份证正面
imageInfoType = '1'
} else if (that.type == 'fileListIdBack' && that.id == '1') {
//身份证反面
imageInfoType = '2'
} else if (that.type == 'fileListBank') {
imageInfoType = '3'
} else if (that.type == 'fileListIdFront' && that.id == '2') {
//户口本正面
imageInfoType = '5'
} else if (that.type == 'fileListIdBack' && that.id == '2') {
//户口本反面
imageInfoType = '6'
} else if (that.type == 'fileLIstImg' && that.id == '3') {
} else if (that.type == 'fileListIdFront' && that.id == '3') {
//出生证正面
imageInfoType = '7'
} else if (that.type == 'fileListIdBack' && that.id == '3') {
//出生证反面
imageInfoType = '12'
} else if (that.type == 'fileLIstImg' && that.id == '4') {
//护照面
imageInfoType = '8'
} else if (that.type == 'fileLIstImg' && that.id == '5') {
} else if (that.type == 'fileListIdFront' && that.id == '5') {
//港澳居民来往内地通行证正面
imageInfoType = '9'
} else if (that.type == 'fileLIstImg' && that.id == '6') {
} else if (that.type == 'fileListIdBack' && that.id == '5') {
//港澳居民来往内地通行证反面
imageInfoType = '13'
} else if (that.type == 'fileListIdFront' && that.id == '6') {
//台湾居民来往大陆通行证正面
imageInfoType = '10'
} else if (that.type == 'saleInsuredInfoOther' && that.id == '7') {
imageInfoType = '11'
} else if (that.type == 'fileListIdBack' && that.id == '6') {
//台湾居民来往大陆通行证反面
imageInfoType = '14'
} else if (that.type == 'fileListIdFront' && that.id == '8') {
//外国人永久居留身份证正面
imageInfoType = '15'
} else if (that.type == 'fileListIdBack' && that.id == '8') {
//外国人永久居留身份证反面
imageInfoType = '16'
} else if (that.type == 'fileListIdFront' && that.id == '9') {
//港澳台居民居住证正面
imageInfoType = '17'
} else if (that.type == 'fileListIdBack' && that.id == '9') {
//港澳台居民居住证反面
imageInfoType = '18'
} else if (that.type == 'fileListBank') {
//银行卡正面
imageInfoType = '19'
} else if (that.type == 'fileListBankBack') {
//银行卡正面
imageInfoType = '20'
}
let obj = {
businessNo: that.orderNo,
@@ -708,26 +782,57 @@ export default {
let imageInfoType = ''
// if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
// imageInfoType = '1'
// } else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
// imageInfoType = '2'
// } else if (that.type == 'fileListBankInsured') {
// imageInfoType = '3'
// } else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
// imageInfoType = '5'
// } else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
// imageInfoType = '6'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '3') {
// imageInfoType = '7'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
// imageInfoType = '8'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '5') {
// imageInfoType = '9'
// } else if (that.type == 'fileLIstImgInsured' && that.id == '6') {
// imageInfoType = '10'
// } else if (that.type == 'saleInsuredPersonInfoOther' && that.id == '7') {
// imageInfoType = '11'
// }
if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
imageInfoType = '1'
} else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
imageInfoType = '2'
} else if (that.type == 'fileListBankInsured') {
imageInfoType = '3'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
imageInfoType = '5'
} else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
imageInfoType = '6'
} else if (that.type == 'fileLIstImgInsured' && that.id == '3') {
} else if (that.type == 'fileListIdFrontInsured' && that.id == '3') {
imageInfoType = '7'
} else if (that.type == 'fileListIdBackInsured' && that.id == '3') {
imageInfoType = '12'
} else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
imageInfoType = '8'
} else if (that.type == 'fileLIstImgInsured' && that.id == '5') {
} else if (that.type == 'fileListIdFrontInsured' && that.id == '5') {
imageInfoType = '9'
} else if (that.type == 'fileLIstImgInsured' && that.id == '6') {
} else if (that.type == 'fileListIdBackInsured' && that.id == '5') {
imageInfoType = '13'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '6') {
imageInfoType = '10'
} else if (that.type == 'saleInsuredPersonInfoOther' && that.id == '7') {
imageInfoType = '11'
} else if (that.type == 'fileListIdBackInsured' && that.id == '6') {
imageInfoType = '14'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '8') {
imageInfoType = '15'
} else if (that.type == 'fileListIdBackInsured' && that.id == '8') {
imageInfoType = '16'
} else if (that.type == 'fileListIdFrontInsured' && that.id == '9') {
imageInfoType = '17'
} else if (that.type == 'fileListIdBackInsured' && that.id == '9') {
imageInfoType = '18'
}
let obj = {
@@ -774,6 +879,9 @@ export default {
case 'fileListBank':
that.fileListBank = []
break
case 'fileListBankBack':
that.fileListBankBack = []
break
case 'fileListOther':
that.fileListOther = []
break
@@ -888,6 +996,7 @@ export default {
fileListIdFront,
fileListIdBack,
fileListBank,
fileListBankBack,
radio,
fileLIstImg,
fileListIdFrontInsured,
@@ -901,6 +1010,7 @@ export default {
fileListIdFront,
fileListIdBack,
fileListBank,
fileListBankBack,
radio,
fileListIdFrontInsured,
fileListIdBackInsured,
@@ -919,16 +1029,19 @@ export default {
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileListIdFrontInsured.length != '0' &&
val.fileListIdBackInsured.length != '0' &&
val.radio !== '') ||
(val.fileLIstImg.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileListIdFrontInsured.length != '0' &&
val.fileListIdBackInsured.length != '0' &&
val.radio !== '') ||
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileListIdFrontInsured.length != '0' &&
val.fileListIdBackInsured.length != '0' &&
val.fileListBankInsured.length != '0' &&
@@ -940,15 +1053,21 @@ export default {
val.radio !== '') ||
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileListBankInsured.length != '0' &&
val.fileLIstImgInsured.length != '0' &&
val.radio !== '') ||
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileLIstImgInsured.length != '0' &&
val.radio !== '') ||
(val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileLIstImg.length != '0' &&
val.fileLIstImgInsured.length != '0' &&
val.radio !== '') ||
(val.fileListBank.length != '0' && val.fileLIstImg.length != '0' && val.fileLIstImgInsured.length != '0' && val.radio !== '') ||
(val.fileLIstImg.length != '0' && val.fileLIstImgInsured.length != '0' && val.fileListBankInsured.length != '0' && val.radio !== '') ||
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
@@ -961,13 +1080,21 @@ export default {
val.fileListIdFrontInsured.length != '0' &&
val.fileListIdBackInsured.length != '0' &&
val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' && val.fileListBank.length != '0' && val.fileLIstImgInsured.length != '0' && val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileLIstImgInsured.length != '0' &&
val.radio !== '') ||
(val.saleInsuredPersonInfoOther.length != '0' &&
val.fileListBankInsured.length != '0' &&
val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' && val.fileListBank.length != '0' && val.fileLIstImg.length != '0' && val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileLIstImg.length != '0' &&
val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' &&
val.fileListBankInsured.length != '0' &&
val.fileListIdFrontInsured.length != '0' &&
@@ -975,14 +1102,27 @@ export default {
val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' && val.fileListBankInsured.length != '0' && val.fileLIstImg.length != '0' && val.radio !== '') ||
(val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.saleInsuredPersonInfoOther.length != '0' &&
val.radio !== '') ||
(val.fileListBank.length != '0' && val.fileLIstImg.length != '0' && val.saleInsuredPersonInfoOther.length != '0' && val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' && val.fileListBank.length != '0' && val.saleInsuredPersonInfoOther.length != '0' && val.radio !== '') ||
(val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.fileLIstImg.length != '0' &&
val.saleInsuredPersonInfoOther.length != '0' &&
val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.saleInsuredPersonInfoOther.length != '0' &&
val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' && val.saleInsuredPersonInfoOther.length != '0' && val.fileListBankInsured.length != '0' && val.radio !== '') ||
(val.saleInsuredInfoOther.length != '0' && val.fileListBank.length != '0' && val.radio !== '' && this.relationToAppnt == '1')
(val.saleInsuredInfoOther.length != '0' &&
val.fileListBank.length != '0' &&
val.fileListBankBack.length != '0' &&
val.radio !== '' &&
this.relationToAppnt == '1')
) {
that.isDisabled = false
} else {