|
|
@@ -26,23 +26,16 @@
|
|
|
</uni-forms-item>
|
|
|
<uni-row class="demo-uni-row uni-row1" :gutter="20">
|
|
|
<uni-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10" class="mb-3">
|
|
|
- <cwg-file-picker-wrapper v-model="fileListID1.path" :editable="fileListID1.status != 2" :limit="1"
|
|
|
+ <cwg-file-picker-wrapper v-model="fileListID1.path" :disabled="fileListID1.status == 2" :limit="1"
|
|
|
+ :delIcon="fileListID1.status != 2"
|
|
|
:fileMediatype="'all'" uploadUrl="/custom/file/upload/1" :baseUrl="updateUrl"
|
|
|
:imageWidth="150"
|
|
|
:imageHeight="150" :showPreviewDelete="false" :canDelete="false"
|
|
|
:uploadError="false"
|
|
|
- :showProgress="false" :canChoose="true" :showError="false"
|
|
|
- :show-progress="false" disablePreview
|
|
|
+ :showProgress="false" :showError="false"
|
|
|
:image-styles="imageStyle"
|
|
|
@update:modelValue="(val) => handleFileUpdate(val, '1')"
|
|
|
customClass="avatar-uploader">
|
|
|
- <view class="file-item">
|
|
|
- <image v-if="!isPdf(fileListID1.path)" class="avatar" :src="updateUrl + (fileListID1.path)">
|
|
|
- </image>
|
|
|
- <view v-else>
|
|
|
- <image class="icon" :src="icon_doc" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</cwg-file-picker-wrapper>
|
|
|
<!-- <view v-else>-->
|
|
|
<!-- <view class="file-item">-->
|
|
|
@@ -59,23 +52,16 @@
|
|
|
<!-- </view>-->
|
|
|
</uni-col>
|
|
|
<uni-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10">
|
|
|
- <cwg-file-picker-wrapper v-model="fileListID2.path" :editable="fileListID2.status != 2" :limit="1"
|
|
|
+ <cwg-file-picker-wrapper v-model="fileListID2.path" :disabled="fileListID2.status == 2" :limit="1"
|
|
|
+ :delIcon="fileListID2.status != 2"
|
|
|
:fileMediatype="'all'" uploadUrl="/custom/file/upload/2" :baseUrl="updateUrl"
|
|
|
:imageWidth="150"
|
|
|
:imageHeight="150" :showPreviewDelete="false" :canDelete="false"
|
|
|
:uploadError="false"
|
|
|
:showProgress="false" :canChoose="true" :showError="false"
|
|
|
- :show-progress="false" disablePreview
|
|
|
:image-styles="imageStyle"
|
|
|
@update:modelValue="(val) => handleFileUpdate(val, '2')"
|
|
|
customClass="avatar-uploader">
|
|
|
- <view class="file-item">
|
|
|
- <image v-if="!isPdf(fileListID2.path)" class="avatar" :src="updateUrl + (fileListID2.path)">
|
|
|
- </image>
|
|
|
- <view v-else>
|
|
|
- <image class="icon" :src="icon_doc" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</cwg-file-picker-wrapper>
|
|
|
</uni-col>
|
|
|
<uni-col :xs="24" :sm="24" :md="4" :lg="4" :xl="4">
|
|
|
@@ -479,23 +465,30 @@
|
|
|
<uni-row class="demo-uni-row uni-row1" :gutter="20">
|
|
|
<uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
<cwg-file-picker-wrapper :limit="9" :multiple="true" :fileMediatype="'all'"
|
|
|
- uploadUrl="/custom/file/upload/10" :baseUrl="updateUrl" :imageWidth="100" :imageHeight="60" noFileList
|
|
|
- :showPreviewDelete="false" :canDelete="false" :uploadError="false" :showProgress="false"
|
|
|
- :image-styles="imageStyle" @update:modelValue="(val) => handleFileUpdate(val, '10')"
|
|
|
- custom-class="fileOther" :showError="false">
|
|
|
+ uploadUrl="/custom/file/upload/10" :baseUrl="updateUrl" :imageWidth="100"
|
|
|
+ :imageHeight="60" noFileList
|
|
|
+ :showPreviewDelete="false" :canDelete="false" :uploadError="false"
|
|
|
+ :showProgress="false"
|
|
|
+ :image-styles="imageStyle"
|
|
|
+ @update:modelValue="(val) => handleFileUpdate(val, '10')"
|
|
|
+ custom-class="fileOther" :showError="false">
|
|
|
<template #add-button="{ handleChoose }">
|
|
|
- <button type="primary" class="btn btn-danger waves-effect waves-light btn-upload" @click="handleChoose">{{ t('Btn.Upload') }}</button>
|
|
|
+ <button type="primary" class="btn btn-danger waves-effect waves-light btn-upload"
|
|
|
+ @click="handleChoose">{{ t('Btn.Upload') }}
|
|
|
+ </button>
|
|
|
</template>
|
|
|
|
|
|
</cwg-file-picker-wrapper>
|
|
|
<view class="fileList">
|
|
|
<view id="files" v-for="(item, index) in fileListOthers" :key="index">
|
|
|
<cwg-file-picker-wrapper customClass="list_upload" v-model="item.path"
|
|
|
- :disabled="item.status == 2" :limit="1" :fileMediatype="'all'"
|
|
|
- :uploadUrl="'/custom/file/upload/10/' + item.id" :baseUrl="updateUrl" :uploadError="false"
|
|
|
- :showProgress="false" :imageWidth="200" :imageHeight="150" :showPreviewDelete="true"
|
|
|
- :disablePreview="true" :image-styles="imageStyle" :canChoose="true"
|
|
|
- @update:modelValue="(val) => handleFileUpdate(val, '1')">
|
|
|
+ :disabled="item.status == 2" :limit="1" :fileMediatype="'all'"
|
|
|
+ :uploadUrl="'/custom/file/upload/10/' + item.id" :baseUrl="updateUrl"
|
|
|
+ :uploadError="false"
|
|
|
+ :showProgress="false" :imageWidth="200" :imageHeight="150"
|
|
|
+ :showPreviewDelete="true"
|
|
|
+ :disablePreview="true" :image-styles="imageStyle" :canChoose="true"
|
|
|
+ @update:modelValue="(val) => handleFileUpdate(val, '1')">
|
|
|
</cwg-file-picker-wrapper>
|
|
|
<view class="options">
|
|
|
<u-button style="margin-right: 20px;" :disabled="item.status == 2" @click.stop="showFile(item)">
|
|
|
@@ -839,11 +832,11 @@
|
|
|
currentStep.value = parseInt(options?.currentStep || '1', 10)
|
|
|
})
|
|
|
|
|
|
- async function goStep(step: number,isBack = false) {
|
|
|
+ async function goStep(step: number, isBack = false) {
|
|
|
console.log(step, 'step')
|
|
|
loadingStates.value.next = true
|
|
|
// 返回不需要校验
|
|
|
- if (!isBack){
|
|
|
+ if (!isBack) {
|
|
|
if (step == 3) {
|
|
|
if (!formData.value?.identity) {
|
|
|
toast(t('vaildate.IDCard.empty'))
|
|
|
@@ -885,12 +878,12 @@
|
|
|
const { identity, gender, birth, addressLines1, lastName, firstName } = formData.value
|
|
|
formData.value = {
|
|
|
...formData.value,
|
|
|
- identity: identity? identity: idCard,
|
|
|
- gender: gender ?gender: (gender1 == '男' ? 1 : 2),
|
|
|
- birth: birth ?birth: Date.parse(new Date(birthDate).toString()),
|
|
|
- addressLines1: addressLines1 ?addressLines1: address,
|
|
|
- lastName: lastName ?lastName: names[0],
|
|
|
- firstName: firstName ?firstName: names[1],
|
|
|
+ identity: identity ? identity : idCard,
|
|
|
+ gender: gender ? gender : (gender1 == '男' ? 1 : 2),
|
|
|
+ birth: birth ? birth : Date.parse(new Date(birthDate).toString()),
|
|
|
+ addressLines1: addressLines1 ? addressLines1 : address,
|
|
|
+ lastName: lastName ? lastName : names[0],
|
|
|
+ firstName: firstName ? firstName : names[1],
|
|
|
}
|
|
|
console.log(formData.value, '2')
|
|
|
}
|
|
|
@@ -1073,11 +1066,12 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
-function handleFileUpdate(value, type) {
|
|
|
- console.log(value, type, 'uplaod')
|
|
|
- if (type == 10) {
|
|
|
- // uni.showToast({ title: t('card.New1.d5'), icon: 'none' })
|
|
|
- getCustomFileList();
|
|
|
+ function handleFileUpdate(value, type) {
|
|
|
+ console.log(value, type, 'uplaod')
|
|
|
+ if (type == 10) {
|
|
|
+ // uni.showToast({ title: t('card.New1.d5'), icon: 'none' })
|
|
|
+ getCustomFileList()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function handleOcr(value, type) {
|
|
|
@@ -1453,16 +1447,16 @@ function handleFileUpdate(value, type) {
|
|
|
return flag
|
|
|
}
|
|
|
|
|
|
-// 监听表单字段变化
|
|
|
-watch(
|
|
|
- () => formData.value.firstName,
|
|
|
- () => {
|
|
|
- if (localStorage.getItem('lang') == 'cn' && formData.value.firstName && formData.value.lastName) {
|
|
|
- formData.value.nameEn = pinyin(`${formData.value.firstName} ${formData.value.lastName}`)
|
|
|
- pinyin
|
|
|
- }
|
|
|
- },
|
|
|
-)
|
|
|
+ // 监听表单字段变化
|
|
|
+ watch(
|
|
|
+ () => formData.value.firstName,
|
|
|
+ () => {
|
|
|
+ if (localStorage.getItem('lang') == 'cn' && formData.value.firstName && formData.value.lastName) {
|
|
|
+ formData.value.nameEn = pinyin(`${formData.value.firstName} ${formData.value.lastName}`)
|
|
|
+ pinyin
|
|
|
+ }
|
|
|
+ },
|
|
|
+ )
|
|
|
|
|
|
watch(
|
|
|
() => formData.value.lastName,
|
|
|
@@ -1897,12 +1891,13 @@ watch(
|
|
|
margin-bottom: px2rpx(5);
|
|
|
}
|
|
|
|
|
|
- .back {
|
|
|
- font-size: px2rpx(12);
|
|
|
- color: var(--bs-heading-color);
|
|
|
+ .back {
|
|
|
+ font-size: px2rpx(12);
|
|
|
+ color: var(--bs-heading-color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn-upload {
|
|
|
+ width: px2rpx(120);
|
|
|
}
|
|
|
-}
|
|
|
-.btn-upload{
|
|
|
- width: px2rpx(120);
|
|
|
-}
|
|
|
</style>
|