|
@@ -26,23 +26,16 @@
|
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
|
<uni-row class="demo-uni-row uni-row1" :gutter="20">
|
|
<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">
|
|
<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"
|
|
:fileMediatype="'all'" uploadUrl="/custom/file/upload/1" :baseUrl="updateUrl"
|
|
|
:imageWidth="150"
|
|
:imageWidth="150"
|
|
|
:imageHeight="150" :showPreviewDelete="false" :canDelete="false"
|
|
:imageHeight="150" :showPreviewDelete="false" :canDelete="false"
|
|
|
:uploadError="false"
|
|
:uploadError="false"
|
|
|
- :showProgress="false" :canChoose="true" :showError="false"
|
|
|
|
|
- :show-progress="false" disablePreview
|
|
|
|
|
|
|
+ :showProgress="false" :showError="false"
|
|
|
:image-styles="imageStyle"
|
|
:image-styles="imageStyle"
|
|
|
@update:modelValue="(val) => handleFileUpdate(val, '1')"
|
|
@update:modelValue="(val) => handleFileUpdate(val, '1')"
|
|
|
customClass="avatar-uploader">
|
|
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>
|
|
</cwg-file-picker-wrapper>
|
|
|
<!-- <view v-else>-->
|
|
<!-- <view v-else>-->
|
|
|
<!-- <view class="file-item">-->
|
|
<!-- <view class="file-item">-->
|
|
@@ -59,23 +52,16 @@
|
|
|
<!-- </view>-->
|
|
<!-- </view>-->
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
<uni-col :xs="24" :sm="24" :md="10" :lg="10" :xl="10">
|
|
<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"
|
|
:fileMediatype="'all'" uploadUrl="/custom/file/upload/2" :baseUrl="updateUrl"
|
|
|
:imageWidth="150"
|
|
:imageWidth="150"
|
|
|
:imageHeight="150" :showPreviewDelete="false" :canDelete="false"
|
|
:imageHeight="150" :showPreviewDelete="false" :canDelete="false"
|
|
|
:uploadError="false"
|
|
:uploadError="false"
|
|
|
:showProgress="false" :canChoose="true" :showError="false"
|
|
:showProgress="false" :canChoose="true" :showError="false"
|
|
|
- :show-progress="false" disablePreview
|
|
|
|
|
:image-styles="imageStyle"
|
|
:image-styles="imageStyle"
|
|
|
@update:modelValue="(val) => handleFileUpdate(val, '2')"
|
|
@update:modelValue="(val) => handleFileUpdate(val, '2')"
|
|
|
customClass="avatar-uploader">
|
|
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>
|
|
</cwg-file-picker-wrapper>
|
|
|
</uni-col>
|
|
</uni-col>
|
|
|
<uni-col :xs="24" :sm="24" :md="4" :lg="4" :xl="4">
|
|
<uni-col :xs="24" :sm="24" :md="4" :lg="4" :xl="4">
|
|
@@ -478,34 +464,31 @@
|
|
|
</view>
|
|
</view>
|
|
|
<uni-row class="demo-uni-row uni-row1" :gutter="20">
|
|
<uni-row class="demo-uni-row uni-row1" :gutter="20">
|
|
|
<uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
<uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
|
|
- <cwg-file-picker :limit="9" :multiple="true" :editable="true" :fileMediatype="'all'"
|
|
|
|
|
- uploadUrl="/custom/file/upload/10" :baseUrl="updateUrl" :imageWidth="100"
|
|
|
|
|
- :imageHeight="60"
|
|
|
|
|
- :showPreviewDelete="false" :canDelete="false" :uploadError="false"
|
|
|
|
|
- :showProgress="false"
|
|
|
|
|
- :image-styles="imageStyle" @update:modelValue="(val) => handleFileUpdate(val, '10')"
|
|
|
|
|
- custom-class="fileOther" :showError="false">
|
|
|
|
|
- <button type="primary" class="btn btn-danger waves-effect waves-light">{{ t('Btn.Upload') }}
|
|
|
|
|
- </button>
|
|
|
|
|
- </cwg-file-picker>
|
|
|
|
|
|
|
+ <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">
|
|
|
|
|
+ <template #add-button="{ handleChoose }">
|
|
|
|
|
+ <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 class="fileList">
|
|
|
<view id="files" v-for="(item, index) in fileListOthers" :key="index">
|
|
<view id="files" v-for="(item, index) in fileListOthers" :key="index">
|
|
|
-
|
|
|
|
|
<cwg-file-picker-wrapper customClass="list_upload" v-model="item.path"
|
|
<cwg-file-picker-wrapper customClass="list_upload" v-model="item.path"
|
|
|
- :editable="item.status != 2" :limit="1" :fileMediatype="'all'"
|
|
|
|
|
|
|
+ :disabled="item.status == 2" :limit="1" :fileMediatype="'all'"
|
|
|
:uploadUrl="'/custom/file/upload/10/' + item.id" :baseUrl="updateUrl"
|
|
:uploadUrl="'/custom/file/upload/10/' + item.id" :baseUrl="updateUrl"
|
|
|
:uploadError="false"
|
|
:uploadError="false"
|
|
|
:showProgress="false" :imageWidth="200" :imageHeight="150"
|
|
:showProgress="false" :imageWidth="200" :imageHeight="150"
|
|
|
:showPreviewDelete="true"
|
|
:showPreviewDelete="true"
|
|
|
:disablePreview="true" :image-styles="imageStyle" :canChoose="true"
|
|
:disablePreview="true" :image-styles="imageStyle" :canChoose="true"
|
|
|
@update:modelValue="(val) => handleFileUpdate(val, '1')">
|
|
@update:modelValue="(val) => handleFileUpdate(val, '1')">
|
|
|
- <view class="file-item">
|
|
|
|
|
- <image v-if="!isPdf(item.path) || !isPdf(item.againPath)" class="avatar"
|
|
|
|
|
- :src="updateUrl + (item.againPath || item.path)"></image>
|
|
|
|
|
- <view v-else>
|
|
|
|
|
- <image class="icon" :src="icon_doc" />
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
</cwg-file-picker-wrapper>
|
|
</cwg-file-picker-wrapper>
|
|
|
<view class="options">
|
|
<view class="options">
|
|
|
<u-button style="margin-right: 20px;" :disabled="item.status == 2" @click.stop="showFile(item)">
|
|
<u-button style="margin-right: 20px;" :disabled="item.status == 2" @click.stop="showFile(item)">
|
|
@@ -849,11 +832,11 @@
|
|
|
currentStep.value = parseInt(options?.currentStep || '1', 10)
|
|
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')
|
|
console.log(step, 'step')
|
|
|
loadingStates.value.next = true
|
|
loadingStates.value.next = true
|
|
|
// 返回不需要校验
|
|
// 返回不需要校验
|
|
|
- if (!isBack){
|
|
|
|
|
|
|
+ if (!isBack) {
|
|
|
if (step == 3) {
|
|
if (step == 3) {
|
|
|
if (!formData.value?.identity) {
|
|
if (!formData.value?.identity) {
|
|
|
toast(t('vaildate.IDCard.empty'))
|
|
toast(t('vaildate.IDCard.empty'))
|
|
@@ -895,12 +878,12 @@
|
|
|
const { identity, gender, birth, addressLines1, lastName, firstName } = formData.value
|
|
const { identity, gender, birth, addressLines1, lastName, firstName } = formData.value
|
|
|
formData.value = {
|
|
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')
|
|
console.log(formData.value, '2')
|
|
|
}
|
|
}
|
|
@@ -1086,7 +1069,7 @@
|
|
|
function handleFileUpdate(value, type) {
|
|
function handleFileUpdate(value, type) {
|
|
|
console.log(value, type, 'uplaod')
|
|
console.log(value, type, 'uplaod')
|
|
|
if (type == 10) {
|
|
if (type == 10) {
|
|
|
- uni.showToast({ title: t('card.New1.d5'), icon: 'none' })
|
|
|
|
|
|
|
+ // uni.showToast({ title: t('card.New1.d5'), icon: 'none' })
|
|
|
getCustomFileList()
|
|
getCustomFileList()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1464,16 +1447,16 @@
|
|
|
return flag
|
|
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(
|
|
watch(
|
|
|
() => formData.value.lastName,
|
|
() => formData.value.lastName,
|
|
@@ -1913,4 +1896,8 @@ watch(
|
|
|
color: var(--bs-heading-color);
|
|
color: var(--bs-heading-color);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .btn-upload {
|
|
|
|
|
+ width: px2rpx(120);
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|